¹®¼­¸¦ ´Ù½Ã ·ÎµùÇÒ ¶§ ¿ø·¡ÀÇ ¿¤·¹¸àÆ®¿¡¼­ ¹ß»ýµÈ´Ù.


À̺¥Æ® ¼Ó¼º
behavior.onload=handler JScript ¸¸-
behavior.onload=GetRef("handler") VBScript 5.0-
¸í¸íµÈ ½ºÅ©¸³Æ® <SCRIPT for=object event=onload> Explorer-
À̺¥Æ® Ư¼º
Bubbles ¾øÀ½
Ãë¼Ò °¡´É
¹ß»ý ¿øÀÎ ÀÎÅÍ³Ý ÁÖ¼ÒÀÇ Áñ°Üã±â, ´ÜÃàÅ°³ª ¹æ¹®±â·Ï·ÎºÎÅÍ ¿ø·¡ À¥ÆäÀÌÁö¸¦ ·ÎµùÇÑ´Ù.
µðÆúÆ® ÀÛ¿ë ½ºÅ©¸³Æ®¿Í ¿¬°üµÈ ÀÛ¿ëÀ» ½ÃÀÛÇÑ´Ù.
ºñÇìÀ̹öÀÇ onload À̺¥Æ®´Â DHTML °³Ã¼ÀÇ onload À̺¥Æ®¸¦ µ¤¾î¾º¿î´Ù.

srcElement À̺¥Æ®°¡ ¹ß»ýÇÑ °³Ã¼¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
Àû¿ë
°³Ã¼scriptHTMLIE

<BUTTON onclick="window.open('../behavior/exp/wsaveHistory.html','_new','width=500,height=300')">¿¹Á¦ º¸Á¶Ã¢ ¿­±â</BUTTON>
exp/wsaveHistory.html ÄÚµå
<!DOCTYPE html public "-//w3c//dtd html 4//en">
<HTML>
<HEAD>
<TITLE>¾ð¾î ÂüÁ¶ - Javascript - ºñÇìºñ¾î(behavior) - saveHistory ¿¹Á¦</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=euc-kr">
<LINK rel="stylesheet" type="text/css" href="../../public/jscript.css">
<META name="save" content="history">
<STYLE>.sHistory {behavior:url(#default#saveHistory);}</STYLE>
<SCRIPT>
function doSave(){
  message='ÀÔ·ÂÇÏ°í ÁøÇàÇ϶ó.';
  if (oPersistForm.oPersistText.value) document.location='../../public/blank.html';
  else {
    alert(message);
    oPersistForm.oPersistText.focus();
    return false;
  }
}
</SCRIPT>
</HEAD>

<BODY>
<TABLE width=500>
<TR><TD>
<DIV style="border:solid 1 blue;background:fff;text-align:center;width:100%;margin:5">
<H3><SPAN class=titleblue><SPAN class=behavior>saveHistory</SPAN> ¿¹Á¦</SPAN></H3>
</DIV>
<SPAN class=gray><SCRIPT>document.write(document.location)</SCRIPT></SPAN><BR><BR>
<FORM name="oPersistForm">
Á¤º¸ ÀÔ·Â 1: <INPUT type=text id="oPersistText" class=sHistory>(À¯ÁöµÈ´Ù.)<BR>
Á¤º¸ ÀÔ·Â 2: <INPUT type=text id="oPersistNone">(À¯ÁöµÇÁö ¾Ê´Â´Ù.)
</FORM><BR>

<P align=center style="background:ffa;padding:10">ÀÔ·ÂÇÑ ÈÄ  
<BUTTON onClick="doSave()"
  style="background:aff;padding:1;font-size:.9em"><B>¿©±â¸¦ Ŭ¸¯</B></BUTTON>ÇÏ°í ´Ù½Ã µ¹¾Æ¿Í º¸¶ó.</P><BR>

<TABLE cellpadding=8 align=center style="border:solid 1 blue">
<TR><TD align=center><BUTTON onClick="self.close()">ÇöÀç º¸Á¶Ã¢ ´Ý±â</BUTTON></TD></TR>
</TABLE>
</TD></TR></TABLE>

</BODY>
</HTML>
../../public/blank.html ÄÚµå
<!DOCTYPE html public "-//w3c//dtd html 4//en">
<HTML>
<HEAD>
<TITLE>ºó ÆäÀÌÁö</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=EUC-KR">
<LINK rel="stylesheet" type="text/css" href="../public/jscript.css">
</HEAD>

<BODY>
<CENTER>
<BR><BR><BR>
<H3>ºó ÆäÀÌÁö</H3><BR><BR>
<A href="Javascript:history.go(-1)"><IMG src="../../gif/arbackv.gif" border=0 alt="ÀÌÀü ÆäÀÌÁö·Î"></A>
<A href="Javascript:history.back()">ÀÌÀü ÆäÀÌÁö·Î</A>
<BR><BR><BR>
<SPAN class=mini><SPAN class=teal>ÀÌ ÆäÀÌÁö´Â <SCRIPT>document.write(document.location)</SCRIPT> ÀÓ</SPAN></SPAN>
</CENTER>

</BODY>
</HTML>