À¥ÆäÀÌÁö°¡ ÀúÀåµÉ ¶§ °³Ã¼ÀÇ À¯Áö(persist) µ¥ÀÌÅ͸¦ °¡´ÉÇÏ°ÔÇÑ´Ù.
script | object.style.behavior="url('#default#saveSnapshot')"; | |
---|---|---|
object.addBehavior("#default#saveSnapshot"); | ||
HTML | <ELEMENT style="behavior:url('#default#saveSnapshot')" id=idVal> | |
XML | <prefix:CustomTag id=idVal style="behavior:url('#default#saveSnapshot')" /> |
prefix | CustomTag°ú ¿¬°üµÈ XML namespace Á¢µÎ¾îÀÌ´Ù. HTML ű׿¡¼ xmlns ¾ÖÆ®¸®ºäÆ®·Î ¼³Á¤ÇÑ´Ù. |
CustomTag | ÀÛ¼ºÀÚ°¡ Á¤ÀÇÇÏ¿© »ç¿ëÇϴ ű×ÀÌ´Ù. |
idVal | °³Ã¼À» ´ëÇ¥ÇÏ´Â À¯ÀÏÇÑ ÀνÄÀÚ ¹®ÀÚ¿ÀÌ´Ù. |
»ç¿ëÀÚ°¡ À¥ÆäÀÌÁö¸¦ Áö¿ª ÇǾ¾¿¡ HTML ¸¸ À¥ÆäÀÌÁö·Î ÀúÀåÇÒ ¶§, saveSnapshot ºñÇìÀ̹ö´Â °ª, ½ºÅ¸ÀÏ, ź·ÂÀûÀÎ ¾÷µ¥ÀÌÆ®µÈ ³»¿ë, ½ºÅ©¸³Æ® º¯¼öµé·Î ºÎÅÍ À¯ÁöÇÒ ¼ö ÀÖ´Ù.
saveSnapshot ºñÇìÀ̹ö´Â body ¿¤·¹¸àÆ®¿Í rows¿Í cells °°Àº °³º° Å×ÀÌºí ¿¤·¹¸àÆ®µé À¯ÁöÇÒ ¼ö ¾ø´Ù.
saveSnapshot ºñÇìÀ̹ö´Â ¿¤·¹¸àÆ®°¡ id¿Í class·Î ÇÒ´çµÇ¾úÀ¸¸é script ¿¤·¹¸àÆ®ÀÇ ³»¿ëÀ» À¯ÁöÇÒ ¼ö ÀÖ´Ù. saveSnapshot ºñÇìÀ̹ö´Â ¹®ÀÚ¿, ºÎ¿ï°ª°ú Á¤¼ö°ª ¸¸À» À¯ÁöÇÒ ¼ö ÀÖ´Ù. ÁÖ¼®À̳ª, ±â´ÉÇÔ¼ö, ¹è¿º¯¼öµî ½ºÆ®¸³Æ® °³Ã¼´Â Á¦¿ÜµÈ´Ù. ¿ÜºÎ ÀÚ¿ø¿¡ ÀÇÇÑ À¯ÁöµÈ script ¿¤·¹¸àÆ®´Â º¯¼öµéÀ» ¿øõÀ¸·ÎºÎÅÍ À¯Áö ÆäÀÌÁö¿¡ ±â·ÏÇÑ´Ù.
saveSnapshot ºñÇìÀ̹öÀ» »ç¿ëÇϱâ À§ÇÏ¿©, meta ű׷ΠÀ¯Áö Çü½ÄÀÇ ÀνÄÀÚ¸¦ ±â¼úÇÑ´Ù.
<META name="save" content="snapshot">
ÇÊ¿äÇÑ styleÀº ÀζóÀÎÀ̳ª ¹®¼ÀÇ head ºÎºÐ¿¡ ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.
<STYLE>.SnapshotClass {behavior:url(#default#saveSnapshot);}</STYLE>
À¯Áö¸¦ ¿Ã¹Ù¸£°Ô Çϱâ À§Çؼ´Â id°¡ ÇÊ¿äÇÏ´Ù.
saveSnapshot ºñÇìÀ̹ö´Â IE5ÀÇ Win32¿Í Unix Ç÷§Æ®Æû¿¡¼ Áö¿øµÈ´Ù.
À̺¥Æ® | ¼³¸í |
---|---|
onsave | À¥ÆäÀÌÁö°¡ ÀúÀåµÇ°Å³ª ºÏ¸¶Å©¿¡ µî·ÏµÉ ¶§, ȤÀº »ç¿ëÀÚ°¡ ¹®¼·ÎºÎÅÍ ÀÌÅ»ÇßÀ» ¶§, À¯Áö(persist) ¿¤·¹¸àÆ®·Î ºÎÅÍ ¹ß»ýµÈ´Ù. |
°³Ã¼ | IE |
---|---|
<ELEMENT style="behavior:url('#default#saveSnapshot')" id=idVal> | IE5(win32,unix) |
A ACRONYM ADDRESS AREA B BIG BLOCKQUOTE BUTTON CENTER CITE CODE DD DEL DFN DIR DIV DL DT EM FONT FORM hn HR I IMG INPUT type=button INPUT type=checkbox INPUT type=file INPUT type=hidden INPUT type=image INPUT type=password INPUT type=radio INPUT type=reset INPUT type=submit INPUT type=text KBD LABEL LI LISTING MAP MARQUEE MENU OBJECT OL P plainText PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG SUB SUP TABLE TEXTAREA TT U UL VAR XMP |
saveSnapshot ºñÇìÀ̹ö·Î ÀúÀå ÈÄ Àо¶ó.
µ¥ÀÌÅ͸¦ class=SnapshotClassÀ¸·Î ¼³Á¤µÈ form ¿¤·¹¸àÆ®µé·Î ºÎÅÍ snapShotData¿¡ ÀúÀåÇÑ´Ù.
<HTML> <HEAD> <META name="save" content="snapshot"> <STYLE>.SnapshotClass {behavior:url(#default#saveSnapshot);}</STYLE> <SCRIPT class="SnapshotClass" id=oPersistScript> var snapShotData=str=allPersistData=''; function StorePersist(){ var str=snapShotData=''; for(var i=0;i< formName.elements.length;i++){ if (formName.elements[i].type=='text'){ snapShotData+=formName.elements[i].value+'|'; } if (formName.elements[i].tagName=='SELECT'){ snapShotData+='dataType='+formName.elements[i].options[formName.elements[i].selectedIndex].innerText; formName.selName.selected=-1; } } allPersistData=snapShotData; str+='ÀúÀå : snapShotData=<FONT color=blue>'+snapShotData+'</FONT><BR>'; showA.innerHTML=str; } function RestorePersist(){ str=''; if (allPersistData){ collData=allPersistData.split('|'); for(var i=0;i< collData.length;i++){ if (collData[i].indexOf('dataType=')==-1) formName.elements[i].value=collData[i]; else if (collData[i].indexOf('dataType=')>=0){ formName.selName.selectedIndex=collData[i].substring(collData[i].indexOf('=')+1,collData[i].length); str+='allPersistData=<FONT color=blue>'+allPersistData+'</FONT><BR>'; str+='collData=<FONT color=blue>'+collData+'</FONT><BR>'; for (k=0;k< collData.length;k++){ str+='<SPAN style="width:2em"></SPAN>collData['+k+']=<FONT color=blue>'+collData[k]+'</FONT><BR>'; } } } } else str+='ÀúÀåµÈ µ¥ÀÌÅÍ°¡ ¾ø´Ù.'; showA.innerHTML=str; } </SCRIPT> </HEAD> <BODY> <FORM id="formName"> <TABLE width=500> <TR><TD><LABEL for="inName">¼º¸í=</LABEL></TD> <TD><INPUT class="SnapshotClass" type="text" id="inName" size=10 value="È«±æµ¿"></TD> <TD><LABEL for="inArea">Áö¿ª=</LABEL></TD> <TD><INPUT class="SnapshotClass" type="text" id="inArea" size=15 value="¼¿ï Ưº°½Ã"></TD> <TD><LABEL for="selName">Á÷¾÷=</LABEL></TD> <TD> <SELECT id="selName"> <OPTION>ȸ»ç¿ø<OPTION>±³Á÷¿ø<OPTION>Çлý<OPTION selected>ÀÚ¿µ¾÷ </SELECT></TD></TR> </TABLE> <INPUT type="button" value="SCRIPÀÇ µ¥ÀÌÅͷκÎÅÍ ÀúÀå" onclick="StorePersist()"> <INPUT type="button" value="SCRIPÀÇ µ¥ÀÌÅͷκÎÅÍ Àбâ" onclick="RestorePersist()"> </FORM> <DIV id=showA>°á°ú Ç¥½Ãâ</DIV> </BODY> </HTML>