Url ü ǥ window ü ų ּҸ Ѵ.
Script | [propVal=]..propName; | |
HTML | . |
document ü ּ(Unique Resource Locator) 쿡 ϴµ ȴ. Ӽ ּҵ鿡 ȴ.
Url ü HTML <A> <AREA> ± ϰų,
<A href="UrlSting"> <AREA href="UrlSting">
UrlObj=linkText.Url('UrlString');
Url ü 迭(Array) links ü index 'UrlID' ִ.
document.links[index]Url ü index 0̰ Url index ü-1̴.
document.links['UrlID']'UrlID' HTML <A href='UrlID'>...</A> Ȥ <AREA href='UrlID'>...</AREA> ± ҽ ̴ּ.
document.links.length; document.links[index].propertyName;
index | Urls 迭 μ |
propertyName | Ʒ Urlü Ӽ ϳ̴. |
Url ü Ŭϸ document ü referrer Ӽ ü ּ(Url) ´.
۸ũ Ӹ ƴ϶ JavaScript ڵ嵵 ִ.
ῡ Ǵ ּ(Url) ⺻
UrlObj | area |
<A href=../object/area.html#UrlObj name="UrlObj" coords="1,1,100,100" id="UrlId"
charset="EUC-KR" hreflang="ko" rev="jsList.html"
shape="rectangle" title="test" target="_self" urn="testurn"><SPAN class=object>area</SPAN></A>
|
UrlObj1 | <HEAD> |
<link rel="stylesheet" id="UrlObj1" type="text/css" href="../public/jscript.css">
|
UrlObj2 | Խ |
<A href="http://koxo.com/bbs/koxobbs.cgi?db=bbs" name="UrlObj2">Խ</A>
|
UrlObj3 |
<SCRIPT>UrlObj3=document.location</SCRIPT> |
Ȳ Ͽ и ʾҴ.
<DIV class=show style="text-align:center" title=""> <FORM><INPUT type=button value=" " onClick="showAll()"></FORM> </DIV> <SCRIPT> function showAll(){ // Լ Ѵ. obj=document.links; // 迭 obj closeStr='<SPAN style="border:solid 1 gray;padding:3;background:ffa;float:right;cursor:hand" '; // âܱ ڿ . closeStr+='onClick=self.close()>âݱ</SPAN>'; str=closeStr+'<TABLE border=1 cellpadding=1 cellspacing=0 width=100% align=center>'; // ̺ Ѵ. str+='<TR bgcolor=eeeeee><TH>#</TH><TH>protocol</TH><TH>href</TH>'; // ̺ ִ´. str+='<TH>hash</TH><TH>target</TH><TH>host</TH></TR>'; newWin=window.open('','newWin','width=950,height=500,top=100,left=50,toolbars=no,scrollbars=yes'); // 츦 ̸(newWin) οѴ. for (numb=0;numb<obj.length;numb++){ // 迭 ̸ŭ ݺϴ Ѵ. str+='<TR><TD>links['+numb+']</TD>'; // ȣ ִ´. str+='<TD>'+(obj[numb].protocol?obj[numb].protocol:' ')+'</TD>'; // ִ´. // ĭ̸ 鹮( ) ִ´. str+='<TD>'+(obj[numb].href?obj[numb].href:' ')+'</TD>'; // ּҸ ִ´. str+='<TD>'+(obj[numb].hash?obj[numb].hash:' ')+'</TD>'; // ڸ ִ´. // str+='<TD>'+(obj[numb].search?obj[numb].search:' ')+'</TD>'; // ߺ̹Ƿ Ѵ. str+='<TD>'+(obj[numb].target?obj[numb].target:' ')+'</TD>'; // ǥ ִ´. str+='<TD>'+(obj[numb].host?obj[numb].host:' ')+'</TD>'; // ȣƮ ִ´. // str+='<TD>'+(obj[numb].pathname?obj[numb].pathname:' ')+'</TD>'; // ߺ̹Ƿ Ѵ. str+='</TR>'; // ̺ ݴ´. } // Ѵ. str+='</TABLE>'+closeStr; // ̺ ݴ´. newWin.document.write(str); // â Ѵ. } // Լ Ѵ. </SCRIPT>