我怎么用js 文件传多个值???

来源:百度知道 编辑:UC知道 时间:2024/06/23 17:39:35
我想传多个值?用下边的代码实现传多个值到别一个网页
请高手帮忙?
我是初学者???

代码如下
<script>
function chaxun(){
zhi=document.all("bianhao").value;
window.location='test.asp?bianhao='+zhi;
}
</script>
</p>
<form name="form2" method="post" action="">
<p>
<input name="bianhao" type="text" id="bianhao">
</p>
<p>
<input name="bianhao2" type="text" id="bianhao2">
</p>
<p>
<input name="bianhao3" type="text" id="bianhao3">
</p>
</form>
<p><a href="#" onclick="chaxun()">测试</a></p>

<script>
function chaxun(){
zhi=document.all("bianhao").value;
window.location='test.asp?bianhao='+zhi+'&变量='+你的值++'&变量='+你的值;//?后面的值的传递都是 &变量=值
}
</script>
</p>
<form name="form2" method="post" action="">
<p>
<input name="bianhao" type="text" id="bianhao">
</p>
<p>
<input name="bianhao2" type="text" id="bianhao2">
</p>
<p>
<input name="bianhao3" type="text" id="bianhao3">
</p>
</form>
<p><a href="#" onclick="chaxun()">测试</a></p>