JS的网页跳转
<script type="text/javascript">
function gopage(page){ //页码跳转
if(page)
window.open("index.asp?page="+page,"_parent");
//if(page) window.open(window.location.href=window.location.pathname+"?"+window.location.search.substr(1).split("&")[0]+"&page="+page,"_parent");
else
alert("请先输入页码后再点击");
}
</script>
这段代码可以跳转,分开使用都可以。
我现在需要的是,网址没参数比如结尾是ASP的话,直接跳转到?page=
如果有参数?zt=1&inum=2直接连接到后面。
单独我都能做到,使用上面的代码就可以,各位大佬帮忙看看怎么办?