有两个网页页面,想实现:在第一个页面用户输入在文本框中的值通过IE地址栏传递到第二个页面中
我的第一个页面HTML如下:<Script Language=JavaScript>
<!--
function fnOpen(){
var aa;
aa = eval("window.form1.strStu.value");
window.showModalDialog("child.asp?stuName='+aa+'",window,"")
}
-->
</script>
<form method="POST" name="form1" action="abc.asp">
姓名:<input type="text" name="strStu" id="strStu" size="6">
<INPUT TYPE="button" VALUE="查 找" onclick="fnOpen()">
</form>通过运行以上代码我发现点查找按钮后弹出的IE窗口状态栏中显示的地址是http://localhost/child.asp?stuName='+aa+'
但是我需要的是,假设用户在姓名的strStu输入“张三”,那么我想在IE地址栏中的信息是http://localhost/child.asp?stuName=张三
求助各位,我该如何实现?
(备注:我使用的是button按钮,不能使submit提交按钮)
我的第一个页面HTML如下:<Script Language=JavaScript>
<!--
function fnOpen(){
var aa;
aa = eval("window.form1.strStu.value");
window.showModalDialog("child.asp?stuName='+aa+'",window,"")
}
-->
</script>
<form method="POST" name="form1" action="abc.asp">
姓名:<input type="text" name="strStu" id="strStu" size="6">
<INPUT TYPE="button" VALUE="查 找" onclick="fnOpen()">
</form>通过运行以上代码我发现点查找按钮后弹出的IE窗口状态栏中显示的地址是http://localhost/child.asp?stuName='+aa+'
但是我需要的是,假设用户在姓名的strStu输入“张三”,那么我想在IE地址栏中的信息是http://localhost/child.asp?stuName=张三
求助各位,我该如何实现?
(备注:我使用的是button按钮,不能使submit提交按钮)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货