location.assign
ページのURLを指定されたURLに置き換えます。location.replace()と同じ動作になります。Safar 2、iCab 3以降では動作しません。
構文
location.assign(URL)
例文
<html>
<head>
<title>location.assign</title>
<script type="text/javascript"><!--
function newURL () {
location.assign("http://www.openspc2.org/");
}
// --></script>
</head>
<body>
<form>
<input type="button" value="assign" onClick="newURL()">
</form>
</body>
</html>
関連記事
- location.search
- location.replace
- location.reload
- location.protocol
- location.port
- location.pathname
- location.href
- location.hostname
- location.host
- location.hash
スポンサーリンク





