2012. 4. 25. 12:55ㆍNOTE/IT
매초마다 다른 이미지|글자 보여줌
<div id="aniBox">
<!-- 이 공백기호는 반드시 필요, 생략시 에러! -->
</div>
<script>
var message = new Array;
// ****************************************************************
// [사용자 변경이 가능한 옵션]
var second = 2000; // 몇초마다 바꿀건지(1초는 1000)
message[message.length] = '이곳에 입력1'; // 이미지는 '<img src="../images/your1.gif" />' 로 삽입
message[message.length] = '이곳에 입력2'; // 테이블,이미지,가격표 '<table><tr><td> <img src="../images/" /> </td><tr><td>가격:000원</td></table>';
message[message.length] = '이곳에 입력3';
message[message.length] = '이곳에 입력4';
// ****************************************************************/
var i=0;
aniBox.innerHTML = message[i++];
setInterval('aniBox.innerHTML = message[i++];i>=message.length?i=0:null;',second);
</script>
http://home.hanmir.com/~epjang/
<input type="text" name="jumin1" size="6" onkeyup="if(this.value.length==6){this.form.jumin2.focus();}" /> - <input type="text" name="jumin2" size="7" />
</form>
<SCRIPT LANGUAGE="JavaScript">
<!--
startday = new Date();
clockStart = startday.getTime();
function initStopwatch() {
var myTime = new Date();
return((myTime.getTime() - clockStart)/1000);
}
function getSecs() {
var tSecs = Math.round(initStopwatch());
var iSecs = tSecs % 60;
var iMins = Math.round((tSecs-30)/60);
var sSecs ="" + ((iSecs > 9) ? iSecs : "0" + iSecs);
var sMins ="" + ((iMins > 9) ? iMins : "0" + iMins);
document.forms[0].timespent.value = sMins+":"+sSecs;
window.setTimeout('getSecs()',1000);
}
// End -->
</script>
</HEAD>
<BODY onLoad="window.setTimeout('getSecs()',1)">
<form name=test>
<input type=text name=timespent>
</form><!--start sima--><center><input type="button" value="View Source" onClick='window.location="view-source:"+window.location.href'><!--end sima-->
<script language="javascript">
<!--
/////////////////////////////////////////////
// :*: Happyscript :*: //
// 소스 : http://www.happyscript.net //
// 편집 and 소스 설명 : Magic //
// E-mail : flyingmagic@hanmail.net //
/////////////////////////////////////////////
fCol='000000'; // 숫자 색
sCol='ff0000'; // 초바늘 색
mCol='000000'; // 분바늘 색
hCol='000000'; // 시바늘 색
// 자신있는 사람만 손댈것
H='....';
H=H.split('');
M='.....';
M=M.split('');
S='......';
S=S.split('');
Ypos=0;
Xpos=0;
Ybase=8;
Xbase=8;
dots=12;
ns=(document.layers)?1:0;
if (ns){
dgts='1 2 3 4 5 6 7 8 9 10 11 12';
dgts=dgts.split(' ')
for (i=0; i < dots; i++){
document.write('<layer name=nsDigits'+i+' top=0 left=0 height=30 width=30><center><font face=Arial,Verdana size=1 color='+fCol+'>'+dgts[i]+'</font></center></layer>');
}
for (i=0; i < M.length; i++){
document.write('<layer name=ny'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>');
}
for (i=0; i < H.length; i++){
document.write('<layer name=nz'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>');
}
for (i=0; i < S.length; i++){
document.write('<layer name=nx'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>');
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=1; i < dots+1; i++){
document.write('<div id="ieDigits" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial,Verdana;font-size:10px;color:'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++){
document.write('<div id=y style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
}
document.write('</div></div>')
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++){
document.write('<div id=z style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++){
document.write('<div id=x style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
}
document.write('</div></div>')
}
function clock(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.57 + Math.PI * hr/6 + Math.PI*parseInt(time.getMinutes())/360;
if (ns){
Ypos=window.pageYOffset+window.innerHeight-60;
Xpos=window.pageXOffset+window.innerWidth-80;
}
else{
Ypos=document.body.scrollTop+window.document.body.clientHeight-60;
Xpos=document.body.scrollLeft+window.document.body.clientWidth-60;
}
if (ns){
for (i=0; i < dots; ++i){
document.layers["nsDigits"+i].top=Ypos-5+40*Math.sin(-0.49+dots+i/1.9);
document.layers["nsDigits"+i].left=Xpos-15+40*Math.cos(-0.49+dots+i/1.9);
}
for (i=0; i < S.length; i++){
document.layers["nx"+i].top=Ypos+i*Ybase*Math.sin(sec);
document.layers["nx"+i].left=Xpos+i*Xbase*Math.cos(sec);
}
for (i=0; i < M.length; i++){
document.layers["ny"+i].top=Ypos+i*Ybase*Math.sin(min);
document.layers["ny"+i].left=Xpos+i*Xbase*Math.cos(min);
}
for (i=0; i < H.length; i++){
document.layers["nz"+i].top=Ypos+i*Ybase*Math.sin(hrs);
document.layers["nz"+i].left=Xpos+i*Xbase*Math.cos(hrs);
}
}
else{
for (i=0; i < dots; ++i){
ieDigits[i].style.pixelTop=Ypos-15+40*Math.sin(-0.49+dots+i/1.9);
ieDigits[i].style.pixelLeft=Xpos-14+40*Math.cos(-0.49+dots+i/1.9);
}
for (i=0; i < S.length; i++){
x[i].style.pixelTop =Ypos+i*Ybase*Math.sin(sec);
x[i].style.pixelLeft=Xpos+i*Xbase*Math.cos(sec);
}
for (i=0; i < M.length; i++){
y[i].style.pixelTop =Ypos+i*Ybase*Math.sin(min);
y[i].style.pixelLeft=Xpos+i*Xbase*Math.cos(min);
}
for (i=0; i < H.length; i++){
z[i].style.pixelTop =Ypos+i*Ybase*Math.sin(hrs);
z[i].style.pixelLeft=Xpos+i*Xbase*Math.cos(hrs);
}
}
setTimeout('clock()',50);
}
if (document.layers || document.all) window.onload=clock;
//-->
</script>
<br><bR><bR><bR><br><br><bR><bR><bR><br><br><bR><bR><bR><br>
<br><bR><bR><bR><br><br><bR><bR><bR><br><br><bR><bR><bR><br>
<br><bR><bR><bR><br><br><bR><bR><bR><br><br><bR><bR><bR><br>
<br><bR><bR><bR><br><br><bR><bR><bR><br><br><bR><bR><bR><br>
<br><bR><bR><bR><br><br><bR><bR><bR><br><br><bR><bR><bR><br>
<br><bR><bR><bR><br><br><bR><bR><bR><br><br><bR><bR><bR><br>
<!--start sima--><center><input type="button" value="View Source" onClick='window.location="view-source:"+window.location.href'><!--end sima-->
'NOTE > IT' 카테고리의 다른 글
[HTML]TEXTAREA 기본문자 삽입,글자수 제한 하기 (0) | 2012.04.25 |
---|---|
FTP 자동 로그인 스크립트 (0) | 2012.04.25 |
[PHP]문자열을 정해진 길이로 나누어 배열 만들기 (0) | 2012.04.25 |
[HTML] 종합 문법 (0) | 2012.04.25 |
[JAVA SCRIPT]alert(),confirm(),prompt() (0) | 2012.04.25 |