28,391
社区成员
发帖
与我相关
我的任务
分享
<a href="productlist.asp?id=1">点击</a>
<a href="productlist.asp?id=2">点击</a>
<a href="productlist.asp?id=3">点击</a>
<script>
function getItem(item, s){
var re = new RegExp(item + "=([^&]+)","i");
arr = s.match(re);
if(arr) return arr[1];
else return "";
}
window.onload=function(){
var s = location.search;
id = getItem("id", s);
switch(id){
case "1": url = "productview.asp?id=" + id; break;
case "2": url = "xxxx.asp?id=" + id; break;
case "3": url = "productview.asp.asp?id=" + id; break;
}
document.getElementById("fm").src = url;
}
</script>
<iframe id="fm" src="about:blank"></iframe>