Url ü ǥ window ü ų ּҸ Ѵ.

Script [propVal=]..propName;
HTML .
Ư

document ü ּ(Unique Resource Locator) 쿡 ϴµ ȴ. Ӽ ּҵ鿡 ȴ.

ȣ
  1. Url ü HTML <A> <AREA> ±׸ ϰų,

    <A href="UrlSting">
    <AREA href="UrlSting">
    
    <A href="myholder/mydocument.htm#hashPoint"> ڿ</A>
  2. String.link ޼
    UrlObj=linkText.Url('UrlString');
    
    document.write(' ڿ'.link('myholder/mydocument.htm#hashPoint'))

  3. Ȥ ũƮ
    <SCRIPT>document.location='UrlSting' // ش ̵</SCRIPT>
    <SCRIPT>UrlObj=self.location // ش ּ .</SCRIPT>

ȴ.
link ü location ü鵵 Url ü ̹Ƿ Ǹ, Ʒ Ӽ ´.

Url ü JavaScript document.links Ӽ Ÿ 迭 Ѵ.

ȣ

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) ⺻

<protocol>//<host>[:<port>]/<pathname>[<hash>][<search>]
http://server.com[:portName]/pathName/fileName[#hashName][?searchString]



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>

charset Ӽ IE5 NS6
ּ ڼƮ ȯϰų Ѵ.
: .charset[=sVal
ڵ: document.write(UrlObj.charset) :
coords Ӽ IE3.02 NS2
area ü Ǵ ǥ ȼ ȯϰų Ѵ.
: .coords[=coordsVal]
ڵ: document.write(UrlObj.coords) :
disabled Ӽ IE4 NS6
ּ ȰȭϿ° οﰪ ȯϰų Ѵ.
: .disabled[=bVal
ڵ: document.write(UrlObj.disabled) :
hash Ӽ IE3.02 NS2
ּ ӿ ϴ anchor.name ڿ տ hash(#) ڿ ȯϰų Ѵ.
: .hash[=sVal]
ڵ: document.write(UrlObj.hash) :
hash ؼ (ü, Ӽ, ޼, ̺Ʈ, , ǾƷ ) Ŭϰ ΰħ ȴ.
host Ӽ IE3.02 NS2
hostname port ڿ ȯϰų Ѵ.
: .host[=sVal]
ڵ: document.write(UrlObj.host) :
hostname Ӽ IE3.02 NS2
ּ(URL) (server)̸, 굵(subdomain) (domain) ̸ Ȥ ּ(IP address) ڿ ȯϰų Ѵ.
: .hostname[=sVal]
ڵ: document.write(UrlObj.hostname) :
hreflang Ӽ IE5 NS6
ּ  ȯϰų Ѵ.
: .hreflang[=sVal]
ڵ: document.write(UrlObj.hreflang) :
href Ӽ IE3.02 NS2
ּ(Url) ڿ̰ ڿ ȯϰų Ѵ.
: .href[=urlVal]
ڵ: document.write(UrlObj.href) :
length Ӽ IE4 NS2
迭(Urls) ü ̸ ȯѴ.
: [iVal=].length
ڵ: document.write(document.links.length) : ε Ϸ ̹Ƿ Ʒ κ Ե ʾҽ.
media Ӽ IE4 NS6
ּ ޵ ȯϰų Ѵ.
: .media[=sVal]
ڵ: document.write(document.links[7].media='screen') :
Methods Ӽ IE4 -
ּ(Url) ۿ ޼带 ȯϰų Ѵ. ĸ(,) и ڿ̴.
: .Methods[=sVal]
ڵ: document.write(UrlObj.Methods='get') :
mimeType Ӽ IE4 -
ּ(Url) ̸(mimeType) ȯѴ.
: [sVal=].mimeType
ڵ: document.write(UrlObj.mimeType,' | ',UrlObj2.mimeType) :
name Ӽ IE3.02 NS6
ּ(Url) ü ̸ ȯϰų Ѵ.
: .name[=sVal]
ڵ: document.write(UrlObj.name) :
nameProp Ӽ IE4 -
ּ(Url) Ӽ ȯѴ. ȭϸ (hash) κ ڿ ȯϰų Ѵ.
: .nameProp[=sVal]
ڵ: document.write(UrlObj.nameProp) :
pathname Ӽ IE3.02 NS2
ּ(URL) ڿ Ư ڿ ϴ κ ڿ̴.
ϸ Ǵ ڿ ȯϰų Ѵ.
: .pathname[=sVal]
ڵ: document.write(UrlObj.pathname) :
ڵ: document.write(document.links[7].pathname) :
port Ӽ IE3.02 NS2
(server) ϴ Ʈ(port) ϴ ڿ ȯϰų Ѵ.
: .port[=iVal]
ڵ: document.write(UrlObj.port) :
ڵ: document.write(document.links[7].port) :
protocol Ӽ IE3.02 NS2
ּ(URL) ۵Ǵ ڿ ݷ(:)̴. protocol Ӽ ּҿ ϴ ȯѴ.
: [sVal=].protocol
ڵ: document.write(UrlObj.protocol) :
ڵ: document.write(document.links[7].protocol) :
protocolLong Ӽ IE4 -
ּ(URL) ۵Ǵ ڿ ݷ(:)̴.
protocol Ӽ ּҿ ϴ ȯѴ.
: .protocolLong[=sVal]
ڵ: document.write(UrlObj.protocolLong) :
readyState Ӽ IE4
ּ غǾ° ȯѴ.
: [sVal=].readyState
ڵ: document.write(document.links[7].readyState) :
rel Ӽ IE4 NS6
href ƮƮ Ŀ 踦 ȯϰų Ѵ.
: .rel[=sVal]
ڵ: document.write(UrlObj1.rel) :
ڵ: document.write(document.links[7].rel) :
rev Ӽ IE4 NS6
href Ϳ ڷ (reverse link) ȯϰų Ѵ.
: .rev[=sVal]
ڵ: document.write(UrlObj.rev) :
search Ӽ IE3.02 NS2
ּ(URL) ִ ǥ(?) ۵Ǵ (query) ڿ ȯϰų Ѵ.
: .search[=sVal]
ڵ: document.write(UrlObj2.search) :
shape Ӽ IE3.02 NS2
area ü Ǵ ǥ ȯϰų Ѵ.
: .shape[=sVal]
ڵ: document.write(UrlObj.shape) :
target Ӽ IE3.02 NS2
link ü ŬϿ ǥõ ǥ(target) (frame) (window) ȯϰų Ѵ.
: .target[=sVal]
ڵ: document.write(UrlObj.target) :
text Ӽ - NS4
<A>textString</A> ± ӿ Ÿ ڿ ȯϰų Ѵ.
: .text[=sVal]
ڵ: document.write(UrlObj.text,' | ',UrlObj1.text) :
title Ӽ IE4 NS6
ȯϰų Ѵ.
: .title[=sVal]
ڵ: or (i=0;i< document.links.length;i++){if (document.links[i].title) document.write('document.links['+i+'].title='+document.links[i].title)}
:
type Ӽ IE4 NS6
ȯϰų Ѵ.
: .type[=sVal]
ڵ: document.write(UrlObj.type,' | ',UrlObj1.type) :
urn Ӽ IE4 -
ּ(Url) ڿ̰ Link Ӽ κйڿ̸ ȯϰų Ѵ.
: .urn[=urlVal]
ڵ: document.write(UrlObj.urn) :
x / y Ӽ - NS4
ǥ ȯϰų Ѵ.
: .x[=iVal]
: .y[=iVal]
ڵ: document.write(UrlObj.x,' | ',UrlObj1.y) :
Urls Ӽ IE4 NS2
迭 ü ȯѴ.
: document.Urls
ڵ: document.write(document.links) :
ڵ: document.write(document.links.length) : ε Ϸ ̹Ƿ Ʒ κ Ե ʾҽ.

Ȳ Ͽ и ʾҴ.

<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:'&nbsp;')+'</TD>'; //  ִ´.
      //  ׽ ĭ̸ 鹮(&nbsp;) ִ´.
    str+='<TD>'+(obj[numb].href?obj[numb].href:'&nbsp;')+'</TD>'; // ּҸ ִ´.
    str+='<TD>'+(obj[numb].hash?obj[numb].hash:'&nbsp;')+'</TD>'; // ڸ ִ´.
//    str+='<TD>'+(obj[numb].search?obj[numb].search:' ')+'</TD>'; // ߺ̹Ƿ Ѵ.
    str+='<TD>'+(obj[numb].target?obj[numb].target:'&nbsp;')+'</TD>'; // ǥ  ִ´.
    str+='<TD>'+(obj[numb].host?obj[numb].host:'&nbsp;')+'</TD>'; // ȣƮ ִ´.
//    str+='<TD>'+(obj[numb].pathname?obj[numb].pathname:' ')+'</TD>'; // ߺ̹Ƿ Ѵ.
    str+='</TR>'; // ̺  ݴ´.
  } //  Ѵ.
  str+='</TABLE>'+closeStr; // ̺ ݴ´.
  newWin.document.write(str); //  â Ѵ.
} // Լ Ѵ.
</SCRIPT>