遂宁到成都市的火车站:window.location.search.substr(1).split(\"&\")
来源:百度文库 编辑:中科新闻网 时间:2024/05/17 01:54:33
window.location.search.substr(1).split("&") 这里面的相关属性和时间还有参数能具体说明一下吗?
window.location
window的location对象
search
得到的是url中query部分
substr()
返回一个从指定位置开始的指定长度的子字符串
这里设置为1,是为了把url中的?号去掉
split()
将一个字符串分割为子字符串,然后将结果作为字符串数组返回
这里就是把query部分以&为分割符,分割
测试:把下面代码保存为1.htm
注意是1.htm
<script language="javascript">
alert(window.location.search.substr(1).split("&"))
</script>
<a href="1.htm?topic=1&id=2">测试</a>
window.location加密没有用?
window.open与window.location的区别
window.location.search.substr(1).split(\"&\")
请问window.opener.parent.location.reload();self.close()是什么意思?
关于刷新:window.opener.location.reload()的问题
sear里的下载
window.location=('zhanhui_yes.asp'?pageno=<%=pageno%>); 如何改才对
document.location
在这里面改背景色window.open('im.asp','','toolbar=no,location=no,height=500,top=10')
Response.Write("<script language=javascript>window.location.replace('usermana.asp');</script>")