HTMLPage1.htm中
<input id="Button1" onclick="aa()" type="button" value="button" /> <script type="text/javascript">
function aa()
{
var b=2;
window.location.href="HTMLPage2.htm"+"?p="+b;
}
</script>在HTMLPage2.htm?p=2页面中的按钮点击后怎样实现在本页面递归传参,而且这个参数的大小是我可以设置的比如我在HTMLPage2.htm?p=2页面中点击一下<input id="Button1" type="button" value="button" />页面地址变为HTMLPage2.htm?p=3再点击一下是HTMLPage2.htm?p=4,以此类推,这个p的参数大小是我可以设置的
或者
<input id="Button1" type="button" value="button" onclick="link()"/>
<script>
function link(){
var x = ....;
location.href = "Page2.html?p="+x;
}
</script>
function aa()
{var index = location.href.indexOf("p=");
if(index != -1){
var b = location.href.substring(index + 2);
}
window.location.href="HTMLPage2.htm"+"?p="+b;
}
aa();
</script>
这个意思么?