'PC Room/- JavascripT'에 해당되는 글 3건

  1. 2008/01/11 sharP DD Select Box
  2. 2007/11/04 sharP 세계시간 계산, 서버시간을 기초로
  3. 2007/07/04 sharP iframe resize Automatic

DD Select Box

PC Room/- JavascripT 2008/01/11 10:06 sharP

<SCRIPT LANGUAGE="Javascript">
function change(a1)
{           
 if (a1 == 1 ){  
  document.bub01.a2.options.length=0
        document.bub01.a2.options[0]=new Option("Test")
        document.bub01.a2.options[0].value="1"
        document.bub01.a2.options[1]=new Option("Quiz")
        document.bub01.a2.options[1].value="2"
        document.bub01.a2.options[2]=new Option("Project")
        document.bub01.a2.options[2].value="3"
        document.bub01.a2.options[3]=new Option("Homework")
        document.bub01.a2.options[3].value="4"
        document.bub01.a2.options[4]=new Option("Event")
        document.bub01.a2.options[4].value="5"
        document.bub01.a2.options[5]=new Option("Others")
        document.bub01.a2.options[5].value="6"
 }
 if (a1 == 2 ){
  document.bub01.a2.options.length=0
        document.bub01.a2.options[0]=new Option("English")
        document.bub01.a2.options[0].value="1"
        document.bub01.a2.options[1]=new Option("Math")
        document.bub01.a2.options[1].value="2"
        document.bub01.a2.options[2]=new Option("Science")
        document.bub01.a2.options[2].value="3"
        document.bub01.a2.options[3]=new Option("Intensive")
        document.bub01.a2.options[3].value="4"
        document.bub01.a2.options[4]=new Option("Others")
        document.bub01.a2.options[4].value="5"
 }
 if (a1 == 3 ){
  document.bub01.a2.options.length=0
        document.bub01.a2.options[0]=new Option("In-depth reading")
        document.bub01.a2.options[0].value="1"
        document.bub01.a2.options[1]=new Option("Leisure reading")
        document.bub01.a2.options[1].value="2"
        document.bub01.a2.options[2]=new Option("Others")
        document.bub01.a2.options[2].value="3"

 }
 if (a1 == 4 ){
  document.bub01.a2.options.length=0
        document.bub01.a2.options[0]=new Option("Field Trip")
        document.bub01.a2.options[0].value="1"
        document.bub01.a2.options[1]=new Option("School event")
        document.bub01.a2.options[1].value="2"
        document.bub01.a2.options[2]=new Option("New era envet")
        document.bub01.a2.options[2].value="3"
        document.bub01.a2.options[3]=new Option("Contest")
        document.bub01.a2.options[3].value="4"
        document.bub01.a2.options[4]=new Option("Other test")
        document.bub01.a2.options[4].value="5"
        document.bub01.a2.options[5]=new Option("Birth day")
        document.bub01.a2.options[5].value="6"
        document.bub01.a2.options[6]=new Option("After school activities")
        document.bub01.a2.options[6].value="7"
        document.bub01.a2.options[7]=new Option("Others")
        document.bub01.a2.options[7].value="8"
 }


}
</script>

<form name=bub01>
<select name="a1" onchange="change(this.value)">
 <option value=""> Class
 <option value=1> School
 <option value=2> Tutoring
 <option value=3> Reading
 <option value=4> Activity
 <option value=5> Others
</select>

<select name="a2">
 <option value="">Sub class
</select>
</form>

2008/01/11 10:06 2008/01/11 10:06
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://sharpsoul.com/sharp/rss/response/111

댓글+트랙백 ATOM :: http://sharpsoul.com/sharp/atom/response/111

<div id="time">
Korea: <br>&nbsp;<span id=d1></span><br>
Vancouver: <br>&nbsp;<span id=d0></span><br>
Toronto: <br>&nbsp;<span id=d2></span>
</div>
</td></tr></table>

<script>
/*
 벤쿠버 -17시간
 중국 -1 시간
 시드니 +1 시간
 뉴욕 -14시간
*/

 function getTime(){
  d=new Date();
  dd=<? echo $Tt=date('d')?>;
  hh=<? echo $Tt=date('H')?>;
  mm=<? echo $Tt=date('i')?>;
  ss=<? echo $Tt=date('s')?>;

  h=new Array();
  t=new Array();

  h[h.length]=hh-1; //벤
  h[h.length]=hh+16-1; //
  h[h.length]=hh+3-1; //

  mm=(mm<10)?mm='0'+mm:mm;
  ss=(ss<10)?ss='0'+ss:ss;
 
  for(var i=0;i<h.length;i++){
   t[i]=dd;
   if(h[i]>=24){
    t[i]+=1;
    h[i]-=24;
   }
   if(t[i]>=32){
    t[i]=1;
   }
   h[i]=(h[i]<10)?h[i]='0'+h[i]:h[i];
 
//   document.getElementById('d'+i).innerHTML=t[i]+'일 '+h[i]+':'+mm+':'+ss;
   document.getElementById('d'+i).innerHTML=t[i]+'일 '+h[i]+':'+mm;
  }
 }
 tid=setInterval(getTime,1000);
</script>


서버시간을 구하여,
세계시간을 계산해 나타낸다...

2007/11/04 05:44 2007/11/04 05:44
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://sharpsoul.com/sharp/rss/response/88

댓글+트랙백 ATOM :: http://sharpsoul.com/sharp/atom/response/88

<script language='JavaScript' type='text/javascript'>
 function resizeFrame(iframeObj){
  var innerBody = iframeObj.contentWindow.document.body;
  oldEvent = innerBody.onclick;
  innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; };
  var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
  iframeObj.style.height = innerHeight;
  var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
  iframeObj.style.width = innerWidth;    
  if( !arguments[1] )        /* just leave Scroll in case specific event. */
    this.scrollTo(1,1);
 }
</script>

<iframe name="SharP" id="SharP" src=",,," style="width:400px"
 frameborder="0" framespacing="0" scrolling="no" onLoad="resizeFrame(this);"></iframe>

2007/07/04 13:33 2007/07/04 13:33
TAG ,
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://sharpsoul.com/sharp/rss/response/8

댓글+트랙백 ATOM :: http://sharpsoul.com/sharp/atom/response/8