此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【wenyisi_qiqiu】截止到2008-07-18 10:29:25的历史汇总数据(不包括此帖):
发帖的总数量:0 发帖的总分数:0 每贴平均分数:0
回帖的总数量:0 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:0 结贴的总分数:0
无满意结贴数:0 无满意结贴分:0
未结的帖子数:0 未结的总分数:0
结贴的百分比:---------------------结分的百分比:---------------------
无满意结贴率:---------------------无满意结分率:---------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
楼主【wenyisi_qiqiu】截止到2008-07-18 10:29:25的历史汇总数据(不包括此帖):
发帖的总数量:0 发帖的总分数:0 每贴平均分数:0
回帖的总数量:0 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:0 结贴的总分数:0
无满意结贴数:0 无满意结贴分:0
未结的帖子数:0 未结的总分数:0
结贴的百分比:---------------------结分的百分比:---------------------
无满意结贴率:---------------------无满意结分率:---------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
<html> <script language="javascript">
function test(){
window.open("test.jsp?url="+document.getElementById("url").value,'_blank','');
}
</script><% String url="123456789"; %>
<input type=text name=url id="url" value=" <%=url %>">
<body onload="test()">
.....
</body>
</html>test.jsp
<html>
<head></head>
<% String url = request.getParameter("url"); %>
<body>
The url is <%=url%>
</body>
</html>
不过楼上的拼接url,也不错啊
换成 JSP 效果一样. father.html<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>父窗口</title>
</head>
<script language=javascript>
function openChild(){
window.open("child.html","子窗口传值测试", "menubar=no,width=400,height=200,resizeable=no");
}
</script>
<body>
<form name="form1" method="post">
<input type="text" name="mytest" size="50">
<input type="button" value="提交" onClick="openChild()">
</form>
</body>
</html>
child.html<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>子窗口</title>
</head>
<body>
<script language=javascript>
var test = window.opener.document.form1.mytest.value;
document.writeln("您输入的信息是:"+test);
</script>
</body>
</html>
4楼同学的
function test(){
window.open("test.jsp?url="+document.getElementById("url").value,'_blank','');
}
在url里面直接跟参数当然可以,但是如果要提交的参数太多了,url长度是有限制的怎么办?或者提交的参数里面有敏感信息怎么办?因此还是用post来提交比较好,like this:
window.open('',"printWindow","top=100,left=100,width=800,height=600,channelmode = no,directories=no,resizable=yes,location=no,menubar=no,scrollbars=yes,status=no,titlebar=no,toolbar=no");
document.frm.action="xxxx.do";
document.frm.target="printWindow";
document.frm.queryOrPrint.value="print";
document.frm.oneorthree.value="3"; ....... //可以跟很多很多参数 document.frm.submit();
document.frm.target="_self";