
<a href="http://www.ttjsyyq.com/product/products.asp?second_id=3002">锚标签</a>
?后面的second_id=参数,可以到下个页面接收second_id传过来的值,也就是3002
asp接收是这样写的
second_id=Request.QueryString("second_id")
response.write(second_id)
那么输入就会显示3002
可以啊1.html
<a href="2.html?id=1">向2.html页面赋值</a>
2.html
<input id="e">
<script>document.getElementById("e").value = location.href</script>
可以,不过由于html本身不具备动态处理页面功能,那么要在下一个页面使用js进行获取,而且就算获取到你,使用起来也比较麻烦<a href = "exhibithall.html?中国">中国</a>
exhibithall.html中的js
var url = document.URL//获取当前页面的url
var urlA = url.split('?')以url中的问号进行分割
var word = urlA[1] //这个word就能得到“中国”这个文字
至于怎么样,那就要看你的具体需求了。。。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)