게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
질문좀 드립니다!!! 프로그래머 고수님들 ㅠ
게시물ID : programmer_4409짧은주소 복사하기
작성자 : 커피거북이
추천 : 0
조회수 : 270회
댓글수 : 1개
등록시간 : 2014/07/08 12:35:34
옵션
  • 본인삭제금지
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">



<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>

<meta name="viewport" content="width=device-width,

minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>

<title>Black LS Clock</title>

<link rel="stylesheet" href="main.css" type="text/css">

<script type="text/javascript" charset="utf-8">

var twentyFourHourTime = true;

function updateClock() {

var currentTime = new Date();

var currentHours = currentTime.getHours();

var currentHoursDisplay = currentTime.getHours();

if (twentyFourHourTime == false) {

if (currentHours > 12) {currentHours = currentHours - 12};

if (currentHours == "0") {

currentHours = "12";

}

}

var currentMinutes = currentTime.getMinutes();

var timeOfDay = ( currentHoursDisplay < 12 ) ? "" : "";

if (currentHours < 10) {currentHours = "0" + currentHours};

if (currentMinutes < 10) {currentMinutes = "0" + currentMinutes};

var formattedMinutes = String(currentMinutes);

var formattedHours = String(currentHours);

formattedMinutes = formattedMinutes.split("");

formattedHours = formattedHours.split("");

document.getElementById("hours").innerHTML = "<span></span>" + formattedHours[0] + "" + formattedHours[1];

document.getElementById("minutes").innerHTML = "<span></span>" + formattedMinutes[0] + "" + formattedMinutes[1];

document.getElementById("ampm").innerHTML = "<span></span>" + timeOfDay;

}


function handle() {

    setTimeout('handle()',1000);

    updateClock();

    }



function Day() {

    day = new Array("DIMANCHE", "LUNDI","MARDI","MERCREDI","JEUDI","VENDREDI","SAMEDI");

    return day[date().getDay()];

}

/* "1<sup style='font-size:10;vertical align:60%'>st</sup>",*/ /*post-it*/

function DayNumeric() {
dayNumeric = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
    return dayNumeric[date().getDate()];
}
function Month() {

    month = new Array("JAN","FEV","MARS","AVR","MAI","JUIN","JUIL","AOUT","SEP","OCT","NOV","DEC");

    return month[date().getMonth()];

}



function Year() {

    return date().getFullYear();





}



function date() {

    return new Date();

}

</script>

</head>

<body id="Black LS Clock" onload="handle();">

<div id="pagewrap">

<div id="clock">

<div id="hours">

</div>

<div id="minutes">

</div>

<div id="ampm">

</div>


<div id="date">

   <div id="day">

   <script type="text/javascript">

   document.write(Day());

   </script>

   <div id="dayNumeric">

   <script type="text/javascript">

   document.write(DayNumeric());

</script></div>

<div id="month">

   <script type="text/javascript">

   document.write(Month());

</script></div>

   <div id="year">

   <script type="text/javascript">

   document.write(Year());

</script></div>




   

</body>

</html>





여기에~~


<html>
<head>
<style>
SPAN#name
{
font-family: Helvetica;
font-weight: bold;
color: #ffffff; 
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.7);
font-size: 22px;
position:absolute;
top:312px;
left:154px;
}

SPAN#dayCount
{
font-family: Helvetica;
font-weight: bold;
color: #ffffff; 
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.7);
font-size: 22px;
position:absolute;
top:0px;
left:35;
}

</style>

<script type="text/javascript">

function calendarDate ( )

{

var this_date_timestamp = new Date()  
var this_date = this_date_timestamp.getDate()  
var this_month = this_date_timestamp.getMonth()    
var this_year = this_date_timestamp.getYear()  
if (this_year < 1000)
  this_year+= 1900;
if (this_year==101)
  this_year=2001;  
   var val1  = "2014-06-11"; // 일자 
var DayContPlus = 1;
var FORMAT = "-";
var start_dt = val1.split(FORMAT);
start_dt[1] = (Number(start_dt[1]) - 1) + "";
var from_dt = new Date(start_dt[0], start_dt[1], start_dt[2]);
var to_dt = new Date(this_year, this_month, this_date);  
var mark = "+"
var txtValue = (parseInt(((to_dt - from_dt) / 1000 / 60 / 60 / 24),10)+DayContPlus );



document.getElementById("name").firstChild.nodeValue = mark;
document.getElementById("dayCount").firstChild.nodeValue = txtValue;
}

</script>

</head>

<body style="margin-left: 0">
<span id="name" align=left>
<span id="dayCount" align=right>
<script language="JavaScript">calendarDate(); setInterval('calendarDate()', 1000 )</script>
</span>

</body>

</html>

이 자바를 넣으려고하는데~ 어떻게 넣어야할지 의문이라서 ㅠㅠ~ 질문좀드립니다 참고로 위에는 시계와 날짜고 밑에껀 카운트 인데 도통 넣을수가없네요 ㅠㅠ
꼬릿말 보기
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호