½Ã°£ÀÌ begin ¾ÖÆ®¸®ºäÆ®ÀÇ °ª¿¡ µµ´ÞÇϰųª resetElement ¸Þ¼µå°¡ È£ÃâµÇ¸é ¿¤·¹¸àÆ®¿¡¼ ¹ß»ýµÈ´Ù.
![]() À̺¥Æ® ¼Ó¼º |
object.onreset=handler | JScript ¸¸- |
|---|---|---|
| object.onreset=GetRef("handler") | VBScript 5.0- | |
| ÀζóÀÎ HTML | <ELEMENT onreset="handler"> | ¸ðµç Ç÷§Æ®Æû |
| ¸í¸íµÈ ½ºÅ©¸³Æ® | <SCRIPT for=object event=onreset> | Explorer- |
| Bubbles | ¾øÀ½ |
|---|---|
| Ãë¼Ò | ºÒ°¡ |
| ¹ß»ý ¿øÀÎ | HTML time2 ºñÇìÀ̹ö°¡ ¿¤·¹¸àÆ®¿¡ ÷ºÎµÇ¾ú´Ù. resetElement ¸Þ¼µå°¡ È£ÃâµÇ¾ú´Ù. |
| µðÆúÆ® ÀÛ¿ë | ¿¬°üµÈ À̺¥Æ®Ã³¸®ÀÚ¸¦ È£ÃâÇÑ´Ù. |
| srcElement | À̺¥Æ®°¡ ¹ß»ýÇÑ °³Ã¼¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. |
| type | À̺¥Æ® °³Ã¼·ÎºÎÅÍÀÇ À̺¥Æ®ÀÇ À̸§(À̺¥Æ®ÀÇ Á¾·ù)¸¦ ¼³Á¤Çϰųª ¹ÝȯÇÑ´Ù. |
| °³Ã¼ | script | HTML | IE |
|---|
¿µ¹® SMIL(Synchronized Multimedia Integration Language) ±Ô°ÝÀÇ È®ÀåÀÌ´Ù.
onreset À̺¥Æ®·Î resetElement ¸Þ¼µå¸¦ È£ÃâÇÏ¿© ½Ã°£¿ë±âÀÇ ½Ã°£À» Àç¼³Á¤ÇÑ´Ù.
<HTML>
<HEAD>
<SCRIPT>
function doReset(){
timeObj.resetElement();
but2.disabled=true;
but1.disabled=false;
timeObj.onreset=showA.innerHTML='½Ã°£¿ë±â ½Ã°£ÀÌ Àç¼³Á¤µÇ¾ú´Ù.';
}
function doSetEnd(eTime){
timeObj.endElementAt(eTime);
if (document.body.currTimeState.activeTime>eTime){
showA.innerHTML=eTime+'Ãʰ¡ ÀÌ¹Ì °æ°úµÇ¾î Áï½Ã Á¾·áÇÑ´Ù.';
but2.disabled=false;
but1.disabled=true;
} else {
showA.innerHTML='ÀÌ ¿ë±â½Ã°£ '+eTime+' ÃÊ¿¡ Á¾·áÇÒ °ÍÀÌ´Ù.';
but2.disabled=false;
but1.disabled=true;
}
}
function doTimeSet(){
doSetEnd(inObj.value);
}
</SCRIPT>
<STYLE>.time { behavior: url(#default#time2) }</STYLE>
<IMPORT namespace="t" implementation="#default#time2">
</HEAD>
<BODY>
¹®¼ Timer: <SPAN id="bTimer" class="time" dur=".01" repeatCount="indefinite" fill="hold"
onrepeat="innerText=parseInt(document.body.currTimeState.activeTime);">0</SPAN><BR>
½Ã°£¿ë±â Timer: <SPAN id="Timer" class="time" dur=".01" repeatCount="indefinite" fill="hold"
onrepeat="innerText=parseInt(timeObj.currTimeState.activeTime);">0</SPAN><BR>
<T:excl id="timeObj" class="time" repeatDur="indefinite" begin="0" onbegin="but1.disabled=false;but2.disabled=true;">
<DIV id="div1" class="time" begin="0" dur="7s">ù¹øÂ° ¹®´Ü 7Ãʵ¿¾È µð½ºÇ÷¹À̵ȴÙ.</DIV>
<DIV id="div2" class="time" begin="7" dur="8s">µÎ¹øÂ° ¹®´Ü 8Ãʵ¿¾È µð½ºÇ÷¹À̵ȴÙ.</DIV>
</T:excl><BR>
<BUTTON id="but1" onclick="doSetEnd(10);">10ÃÊ¿¡ Á¾·á</BUTTON>
<BUTTON id="but2" onclick="doReset();">´Ù½Ã ¼³Á¤</BUTTON><BR>
Á¾·á ½Ã°£ ¼³Á¤ : <INPUT id=inObj type=text size=3 value=20>
<BUTTON id="but9" onclick="doTimeSet();">ÀÔ·Â È®ÀÎ</BUTTON>
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>
</BODY>
</HTML>