如何用超链接提交表单,提交到一个新窗口? <a href="javascript:void(0)" onclick="window.open('1.htm');form1.submit()"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 谢谢你,不过我的意思是提交到'1.htm'中,怎样解决? <a href="javascript:void(0)" onclick="window.open('1.htm')">那你就只能这样1.htm<body onload="opener.form1.submit()"> try.......<a href="javascript:void(0)" onclick="document.form1.target='_blank';document.form1.action='1.htm';document.form1.submit();"> <a href="javascript:void(0)" onclick="form1.submit()">submit</a><form name=form1 action=1.htm target=_blank></form> 我试过,好象不行.是这样的://a.jsp<form name="frm1"><input type="text" name="t1"><a href="javascript:void(0)" onclick="window.open('b.jsp')">提交</a></form>--------------------------------------//b.jsp<% request.getParameter("t1");%>---------------------------------------现在我用你的方法,在a.jsp中输入"1",在b.jsp中,得到的request.getParameter("t1")的是null,怎样解决? 在<form>标签中加上target=a即可,其他的照旧 a.jsp改<script language=javascript>function submit_check(){//...............检查提交数据库是否正确,然后执行下面........window.open("","bs","height=200,width=300,left=0,top=0;status=yes,scrollbars=yes,resizable=yes,fullscreen=no");frm1.target="temp";}</script><form name="frm1" action="b.jsp"><input type="text" name="t1"><a href="#" onclick="return submit_check();">提交</a></form> 求一个JS正则表达式 如何比较两个时间相差的分钟和秒数,并做倒计时? 如何计算这种同一数量和同一价格所产生的总价赋到同一名称的文本框里 MVC easyui datagrid 值问题 如何将网页上的内容,生成WORD文档? 一个多文件上传的客户端问题 高分求得到当前文件夹下的所有文件名或文件夹名称的写法? 如何用javascript在图片上画线?高手请帮忙!! 关于mmGrid 载入远程json数据的问题 关于页面html代码有变更后选中状态保留问题 关于NS邮件和新闻处理器中邮件规则文件的位置 如何获得光标在<input>中的位置?
那你就只能这样
1.htm
<body onload="opener.form1.submit()">
<form name=form1 action=1.htm target=_blank></form>
是这样的:
//a.jsp
<form name="frm1">
<input type="text" name="t1">
<a href="javascript:void(0)" onclick="window.open('b.jsp')">提交</a>
</form>
--------------------------------------
//b.jsp
<%
request.getParameter("t1");
%>
---------------------------------------
现在我用你的方法,在a.jsp中输入"1",在b.jsp中,得到的request.getParameter("t1")的是null,怎样解决?
<script language=javascript>
function submit_check()
{
//...............检查提交数据库是否正确,然后执行下面........
window.open("","bs","height=200,width=300,left=0,top=0;status=yes,scrollbars=yes,resizable=yes,fullscreen=no");
frm1.target="temp";
}
</script><form name="frm1" action="b.jsp">
<input type="text" name="t1">
<a href="#" onclick="return submit_check();">提交</a>
</form>