ÁöÁ¤ÇÑ HTML ¹®¼¸¦ Ç¥½ÃÇϱâÀ§ÇÑ Çü½Ä¾ø´Â ´ëÈâÀ» »ý¼ºÇÏ¿© µð½ºÇ÷¹ÀÌÇÑ´Ù.
ÇʼöÀûÀÎ ¿ä¼ÒÀ̸ç, window °³Ã¼ÀÌ´Ù.
¼±ÅÃÀûÀÎ ¿ä¼ÒÀ̸ç, ¹®¼À» ´ëÈâ¿¡ µð½ºÇ÷¹ÀÌÇÒ ‹š »ç¿ëµÇ´Â Àμö¸¦ ÁöÁ¤ÇÏ´Â °ªÀÌ´Ù. ÀÌ ÆĶó¸ÞÅ͸¦ »ç¿ëÇϸé, ¹è¿º¯¼ö¸¦ Æ÷ÇÔÇÏ¿© ¾î¶² Çü½ÄÀÇ °ªµµ Àü´ÞÇÒ ¼ö ÀÖ´Ù. ´ëÈâÀº È£ÃâÀÚ¿¡ ÀÇÇÏ¿© Àü´ÞµÈ °ªµéÀ» window °³Ã¼ÀÇ dialogArguments ¼Ó¼ºÀ¸·ÎºÎÅÍ ÃßÃâÇÏ¿© »ç¿ëÇÑ´Ù.
dialogHeight:sHeight | ´ëÈâÀ» ³ôÀ̸¦ ´ÜÀ§¸¦ µ¿¹ÝÇÏ¿© ÁöÁ¤ÇÑ´Ù.(´ÜÀ§ ÂüÁ¶) |
dialogLeft:sXPos | µ¥½ºÅ©Åé¿¡ »ó´ëÀûÀÎ ´ëÈâÀ» ¼öÆò°Å¸®¸¦ Çȼ¿´ÜÀ§·Î ÁöÁ¤ÇÑ´Ù. |
dialogTop:sYPos | µ¥½ºÅ©Åé¿¡ »ó´ëÀûÀÎ ´ëÈâÀ» ¼öÁ÷°Å¸®¸¦ Çȼ¿´ÜÀ§·Î ÁöÁ¤ÇÑ´Ù. |
dialogWidth:sWidth | ´ëÈâÀ» ³Êºñ¸¦ ´ÜÀ§¸¦ µ¿¹ÝÇÏ¿© ÁöÁ¤ÇÑ´Ù.(´ÜÀ§ ÂüÁ¶) |
center:{yes|no|1|0|on|off } | µ¥½ºÅ©Åé¿¡¼ ´ëÈâÀ» Áß¾Ó¿¡ À§Ä¡½Ãų °ÍÀΰ¡¸¦ ÁöÁ¤ÇÑ´Ù. µðÆúÆ®´Â yesÀÌ´Ù. |
dialogHide:{yes|no|1|0|on|off} | ´ëÈâÀ» Àμ⳪ Àμâ¹Ì¸®º¸±â¿¡¼ °¨Ãâ °ÍÀΰ¡¸¦ ÁöÁ¤ÇÑ´Ù. ÀÌ´Â ´ëÈâÀÌ ¾ÈÀüÇÑ Àû¿ë¿¡¸¸ ÇØ´çµÈ´Ù. µðÆúÆ®´Â noÀÌ´Ù. |
edge:{sunken|raised} | ´ëÈ⠸𼸮 ½ºÅ¸ÀÏÀ» ÁöÁ¤ÇÑ´Ù. µðÆúÆ®´Â raisedÀÌ´Ù. |
help:{yes|no|1|0|on|off } | Äܵ¦½ºÆ® ¸Þ´º¿¡ µµ¿ò¸» ¾ÆÀÌÅæÀ» µð½ºÇ÷¹ÀÌÇÒ °ÍÀΰ¡¸¦ ÁöÁ¤ÇÑ´Ù. µðÆúÆ®´Â yesÀÌ´Ù. |
resizable:{ yes|no|1|0|on|off } | ´ëÈâÀÇ Å©±â°¡ Á¶ÀýµÇ´Â°¡¸¦ ÁöÁ¤ÇÑ´Ù. µðÆúÆ®´Â noÀÌ´Ù. |
scroll:{yes|no|1|0|on|off} | ´ëÈâ¿¡¼ ½ºÅ©·ÑµÇ´Â°¡¸¦ ÁöÁ¤ÇÑ´Ù. µðÆúÆ®´Â yesÀÌ´Ù. |
status:{yes|no|1|0|on|off} | ´ëÈâ¿¡¼ »óŹٰ¡ µð½ºÇ÷¹À̵Ǵ°¡¸¦ ÁöÁ¤ÇÑ´Ù. ¾ÈÀüÇÏÁö ¾ÊÀº ´ëÈâ¿¡¼ µðÆúÆ®´Â yesÀÌ°í, ¾ÈÀüÇÑ ´ëÈâ¿¡¼´Â noÀÌ´Ù. |
unadorned:{yes|no|1|0|on|off} | ´ëÈâ¿¡¼ Å׵θ® »ö»óÀ» µð½ºÇ÷¹ÀÌÇÒ °ÍÀΰ¡¸¦ ÁöÁ¤ÇÑ´Ù. ÀÌ´Â ´ëÈâÀÌ ¾ÈÀüÇÑ Àû¿ë¿¡¸¸ ÇØ´çµÈ´Ù. µðÆúÆ®´Â noÀÌ´Ù. |
¹Ýȯ°ª vValÀº »õ·Î¿î À©µµ¿ì °³Ã¼¸¦ ÂüÁ¶ÇÑ´Ù. ÀÌ ÂüÁ¶¸¦ »ç¿ëÇÏ¿© »õ·Î¿î À©µµ¿ìÀÇ ¼Ó¼º°ú ¸Þ¼µå¿¡ Á¢¼ÓÇÒ ¼ö ÀÖ´Ù.
»ç¿ëÀÚ°¡ À©µµ¿ì·Î ÃÊÁ¡À» º¯°æÇÏ´õ¶óµµ Çü½Ä¾ø´Â(modeless) ´ëÈâÀº µð½ºÇ÷¹À̵ȴÙ.
showModelessDialog ¸Þ¼µå´Â ¸Þ´º³ª µµ¿ò¸» ü°è¿¡¼ À¯¿ëÇÏ´Ù. ÀÌ ¸Þ¼µå¸¦ ÀÛµ¿½ÃÅ°¸é, ºê¶ó¿ìÀú À©µµ¿ì³ª HTA(HTML Application) Àû¿ë À§Ãþ¿¡ ´ëÈâÀÌ ³ªÅ¸³´Ù.
´ëÈâÀº ¿©·¯ µµ¸ÞÀÎÀ¸·ÎºÎÅÍ ÁÖ¼ÒÀÇ ÀÚ¿øÀ» Æ÷ÇÔÇÒ ¼ö ÀÖÀ¸¹Ç·Î, º¸¾ÈÀ» ¿äÇÏ´Â Á¤º¸¸¦ vArguments ÆĶó¸ÞÅ͸¦ ÅëÇÏ¿© Àü´ÞÇÏÁö ¸»¶ó. vArguments ÆĶó¸ÞÅÍ´Â window °³Ã¼ÀÇ dialogArguments ¼Ó¼ºÀ» ÅëÇÏ¿© ´ëÈâ ¼Ó¿¡¼ ÂüÁ¶µÉ¼ö ÀÖ´Ù. vArguments ÆĶó¸ÞÅÍ°¡ ¹®ÀÚ¿·Î ÁöÁ¤µÇ¾úÀ¸¸é, ´ëÈâ¿¡ Àü´ÞµÇ´Â ÃÖ´ë ¹®ÀÚ¿ÀÇ ±æÀÌ´Â 4096 ±ÛÀÚÀÌ°í, ±× ÀÌ»óÀº Àß·Á¹ö¸°´Ù.
°üÇà¿¡ µû¶ó Çü½Ä¾ø´Â(modeless) ´ëÈâÀº ½ºÅ©·Ñ¹Ù, »óŹٳª âũ±â Á¶ÀýÀÌ ¾ÈµÇ¹Ç·Î ¬¿ë À©µµ¿ì¿Í´Â ´Ù¸£´Ù. À̸¦ »ý¼ºÇϱâ À§Çؼ´Â ´ÙÀ½ ´Ü°è¸¦ µû¸¥´Ù.
showModelessDialog ¸Þ¼µå¿¡¼ ¹Ýȯ°ªÀ» »ý¼ºÇϱâ À§ÇÏ¿© vArguments ÆĶó¸ÞÅÍ¿¡ µÚ·Î È£ÃâÇÏ´Â(callback) ±â´ÉÀ̳ª showModelessDialog È£Ãâ·¹ ÀÖ´Â °³Ã¼¸¦ ¼³Á¤ÇÑ´Ù. Çü½Ä¾ø´Â ´ëÈâ¿¡¼ window °³Ã¼ÀÇ dialogArguments ¼Ó¼ºÀ» ÅëÇÏ¿© ÀÌ ±â´ÉÀ̳ª °³Ã¼¸¦ ÂüÁ¶ÇÒ ¼ö ÀÖ´Ù. showModelessDialog¿Í showModalDialog ¸Þ¼µå¿¡¼ µ¿ÀÏÇÑ Àμö°¡ À¯È¿ÇÏ´Ù.
´ëÈâ¿¡µµ ½ºÅ¸ÀϽ¬Æ®(CSS:Cascading Style Sheets)¿¡¼¿Í ¸¶Âù°¡Áö·Î "font-size:4"¿Í °°ÀÌ µðÆúÆ® ±ÛÁö Å©±â¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù. ¿©·¯ ±Û²ÃÀ» À§ÇÏ¿© ¿©·¯ ±Û²Ã ¾ÖÆ®¸®ºäÆ®¸¦ »ç¿ëÇÏ¸é µÈ´Ù.
centerÀÇ µðÆúÆ®°ªÀÌ yesÀÌÁö¸¸ center¸¦ µ¤¾î¾º¿ì±â À§ÇÏ¿©, dialogLeft¿Í/ȤÀº dialogTop¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù.
dialogHeight¿Í dialogWidthÀÇ µðÆúÆ® ±æÀÌ ´ÜÀ§´Â IE4.0¿¡¼ Çȼ¿(px)ÀÌ°í IE5¿¡¼ emÀÌ´Ù. °ªÀº Á¤¼ö°ªÀ̳ª ºÎµ¿¼Ò¼öÁ¡°ªÀÌ µÉ¼ö ÀÖ°í, ±× µÚ¿¡ ±æÀÌ ´ÜÀ§¸¦ ±â¼úÇÑ´Ù. ´ÜÀ§´Â Àý´ë´ÜÀ§ cm, mm, in, pt, pc, or pxµî°ú »ó´ë´ÜÀ§ em or exµîÀÌ ÀÖ´Ù. ´ëÈâÀÇ ¾ÈÁ¤Àû µð½ºÇ÷¹À̸¦ À§ÇÏ¿© dialogHeight¿Í dialogWidth¸¦ Çȼ¿´ÜÀ§·Î ÁöÁ¤Ç϶ó.
»ç¿ëÀÚ°¡ ´ëÈâÀÇ ³ôÀ̸¦ ¼öµ¿À¸·Î Á¶ÀýÇÒ ¼ö ÀÖÁö¸¸, ´ëÈâÀÌ °¡Àå ÀÛ°Ô Ç¥ÇöµÇ´Â ³ôÀÌ dialogHeight´Â 100 Çȼ¿ÀÌ´Ù.
°³Ã¼ | script | IE |
---|
¼º¸í : È«±æµ¿
showModelessDialog ¸Þ¼µå·Î ÁöÁ¤µÈ ÆäÀÌÁö¸¦ »ç¿ëÇÏ¿© Çü½Ä¾ø´Â(modeless) ´ëÈâÀ» ¸¸µé¾î ÀÔ·ÂÇÏ¸é ¹Ýȯ°ªÀ» À©µµ¿ì¿Í °øÅëÀÇ º¯¼ö·Î À©µµ¿ì¿¡ Àü´ÞÇÑ´Ù.
<HTML> <HEAD> <SCRIPT> var sUserName=''; // °øÅ뺯¼ö·Î ´ëÈâ°ú µ¥ÀÌÅ͸¦ °øÀ¯ÇÑ´Ù. function doOpenDial(){ showModelessDialog('../object/exp/wmyDialog.html',window,'status:false;dialogWidth:400px;dialogHeight:200px'); } function doUpdate(){ oName.innerText = sUserName; // Àü´ÞµÈ °ªÀÇ Àû¿ë } </SCRIPT> </HEAD> <BODY> <P>¼º¸í : <SPAN id="oName" style="color:navy;font-size:14pt">È«±æµ¿</SPAN></P> <INPUT type="button" value="Çü½Ä¾ø´Â ´ëÈâ ¿±â" onclick="doOpenDial()"> </BODY> </HTML>
myDialog.html ÆÄÀÏÀÇ ÄÚµå.
<!DOCTYPE html public "-//w3c//dtd html 3.2//en"> <HTML> <HEAD> <TITLE>¾ð¾î ÂüÁ¶ - Javascript - ¿¹Á¦ - showModelessDialog (window)</TITLE> <META http-equiv="Content-Type" content="text/html; charset=euc-kr"> <SCRIPT> function doGetData(){ var sData = dialogArguments; sData.sUserName = oEnterName.value; sData.doUpdate(); } function doCancel(){ var sData = dialogArguments; sData.sUserName = 'È«±æµ¿'; sData.doUpdate(); } </SCRIPT> </HEAD> <BODY> <H3>Çü½Ä¾ø´Â ´ëÈâ<FONT size=2 style=font-weight:normal>(modeless dialog box)</FONT> ¿¹Á¦</H3> <CENTER> <LABEL for="oEnterName" accesskey="f">¼º¸í : </LABEL> <INPUT id=oEnterName value="À̼ø½Å"><BR><BR> <INPUT value="Àû¿ë" type=button onclick="doGetData();"> <INPUT value="È®ÀÎ" type=button onclick="doGetData();window.close();"> <INPUT value="Ãë¼Ò" type=reset onclick="doCancel();window.close();"> <INPUT value="´Ý±â" type=button onclick="self.close();"> <DIV id=showUrl style="font-size:9pt;color:teal"> <SCRIPT>showUrl.innerText=document.location;</SCRIPT><BR> dialogArguments ¼Ó¼ºÀº À©µµ¿ì¿¡¼ ¼±¾ðÇÑ º¯¼ö¸¦ °øÅëÀ¸·Î °®´Â´Ù.</DIV> </CENTER> </BODY> </HTML>