DHTML: locationオブジェクト  編集:2021.08.19 by T.A.

現在のURLに関する情報。

window.location= /[Edge]
=[object]:file:///C:/Users/asmin/Documents/%E3%83%91%E3%82%BD%E3%82%B3%E3%83%B3%E9%96%A2%E4%BF%82/TA%EF%BC%9AHTML%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9forEdge%E7%B7%A8%E9%9B%86%E4%B8%AD/HTML-Rifarennsu/DHTML/locationO.htm

ancestorOrigins=[object]:[object DOMStringList]

href=[string]:file:///C:/Users/asmin/Documents/%E3%83%91%E3%82%BD%E3%82%B3%E3%83%B3%E9%96%A2%E4・・・

origin=[string]:file://

protocol=[string]:file:

host=[string]:

hostname=[string]:

port=[string]:

pathname=[string]:/C:/Users/asmin/Documents/%E3%83%91%E3%82%BD%E3%82%B3%E3%83%B3%E9%96%A2%E4%BF%82/・・・

search=[string]:

hash=[string]:

assign=[function]:function assign() { [native code] }

reload=[function]:function reload() { [native code] }

replace=[function]:function replace() { [native code] }

toString=[function]:function toString() { [native code] }


表示内容:
表示内容:

assignメソッド
指定された URL を読み込む。
location.assign(URL)
URL 読み込む URL。
【例
JavaScript: <TABLE><TR><TD><TEXTAREA class=SouW> location.assign("../Sample/Picture.jpg"); D=0; </TEXTAREA><BUTTON class=TBtn onclick="JaExDispD(this)">D</BUTTON> </TABLE>
reloadメソッド
現在のページを再読み込みする。
location.reload()
サーバーから読み込み。truefalse(キャッシュから読み込み)。
【初期値】 false¶。
replaceメソッド
指定された URL で現在ページを置き換える。
location.replace(URL)
URL 置き逢え後の URL。
置き換えられた現在ページは履歴には残りません。