1.如果让本页转向新的页面则用:
<input type=button onclick="window.location.href('连接')">
2.如果需要打开一个新的页面进行转向,则用:
<input type=button onclick="window.open('连接')">
JS
url = window.location.href
function GetUrlPara()
{
var url = document.location.toString()
var arrUrl = url.split("?")
var para = arrUrl[1]
return para
}
url = document.domain
用JS获取当前页面地址<script language="javascript">
alert(window.location.href)
alert(window.location)
alert(location.href)
alert(parent.location.href)
alert(top.location.href)
alert(document.location.href)
alert(document.URL)
alert(document.title)
</script>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)