另外一个类似的问题,求救啊,今天下午必须得弄出来。 你的this不代表form代表tdreturn datainit(document.all.fm)或者return datainit(document.forms[0]) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在fm.action那句后面加上fm.submit试试,也可能是fm.submit() 不能为_self换一个随便哪儿个名字都行而且那个THIS返回了BUTTON哦不是表单哦 如果你想提交表但的话不就这样做吧。<script>function datainit(){ var fm = document.forms["fm"];var TrueID=window.confirm("确定要进行操作1吗?如果出错后果严重哦!"); if (TrueID){ window.open("","test"); fm.target = "test"; fm.action = "datainit.asp?ProCode=<%=b%>&user_id=<%=user_id%>&select=<%=Sdate%>"; fm.submit(); }else { return false;} }</script>datainit(fm)好象没有响应,其他的也是如此操作的,需要传递参数。<form method="post" name="fm"> <table width="409" border="0" > </tr> <tr align="center"> <td width="212" height=30 align="center"> <input type="button" name="button_init" value=" 操作1 " onclick="return datainit()"></td> <td width="187" height=30 align="center"> <input type="button" name="button_" value=" 操作2 " onclick=""></td> </tr> <tr> <td height=30 align="center"> <input type="button" name="button_print" value="操作3" onclick=""></td> <td height=30 align="center"> <input type="button" name="button_print" value="操作4" onclick=""></td> </tr><tr><td height=30 colspan="2" align="right"> <input type="button" name="button_close" value="关闭窗口" onclick="javascript:window.close();" ></td> </tr> </table> </form>不知道你是不是这个意思 <script>function datainit(fm){ var TrueID=window.confirm("确定要进行操作1吗?如果出错后果严重哦!"); if (TrueID){ window.open("","_self"); fm.target = "_self"; fm.action = "datainit.asp?ProCode=<%=b%>&user_id=<%=user_id%>&select=<%=Sdate%>"; document.fm.submit(); }else { return false;} } </script><form method="post" name="fm" > <table width="409" border="0" > </tr> <tr align="center"> <td width="212" height=30 align="center"> <input type="button" name="button_init" value=" 操作1 " onclick="return datainit(this)"></td> <td width="187" height=30 align="center"> <input type="button" name="button_" value=" 操作2 " onclick=""></td> </tr> <tr> <td height=30 align="center"> <input type="button" name="button_print" value="操作3" onclick=""></td> <td height=30 align="center"> <input type="button" name="button_print" value="操作4" onclick=""></td> </tr><tr><td height=30 colspan="2" align="right"> <input type="button" name="button_close" value="关闭窗口" onclick="javascript:window.close();" ></td> </tr> </table> </form> window.open("","_self"); 这句不要也可以! AJAX + div 动态显示后台数据 radio与table的联动问题 自定义confirm的问题 js中的innerHTML问题 请教js强人,动态创建问题,有难度 复制<input type="text"> 菜鸟问题:添加删除行 做了个弹窗放百度地图 为什么百度地图的中心点在左上角 如何使鼠标停在超链接时出现子目录 大哥,大姐们 关于用java读取其他文档里面的信息. 请各位帮忙(一个Html问题)!!!
换一个随便哪儿个名字都行
而且那个THIS返回了BUTTON哦不是表单哦
<script>
function datainit()
{
var fm = document.forms["fm"];
var TrueID=window.confirm("确定要进行操作1吗?如果出错后果严重哦!");
if (TrueID){
window.open("","test");
fm.target = "test";
fm.action = "datainit.asp?ProCode=<%=b%>&user_id=<%=user_id%>&select=<%=Sdate%>";
fm.submit();
}else { return false;}
}
</script>
datainit(fm)好象没有响应,其他的也是如此操作的,需要传递参数。<form method="post" name="fm">
<table width="409" border="0" >
</tr>
<tr align="center">
<td width="212" height=30 align="center"> <input type="button" name="button_init" value=" 操作1 " onclick="return datainit()"></td>
<td width="187" height=30 align="center"> <input type="button" name="button_" value=" 操作2 " onclick=""></td> </tr>
<tr> <td height=30 align="center"> <input type="button" name="button_print" value="操作3" onclick=""></td>
<td height=30 align="center"> <input type="button" name="button_print" value="操作4" onclick=""></td> </tr>
<tr><td height=30 colspan="2" align="right"> <input type="button" name="button_close" value="关闭窗口"
onclick="javascript:window.close();" ></td>
</tr>
</table>
</form>
不知道你是不是这个意思
function datainit(fm)
{ var TrueID=window.confirm("确定要进行操作1吗?如果出错后果严重哦!");
if (TrueID){
window.open("","_self");
fm.target = "_self";
fm.action = "datainit.asp?ProCode=<%=b%>&user_id=<%=user_id%>&select=<%=Sdate%>";
document.fm.submit();
}else { return false;}
}
</script>
<form method="post" name="fm" >
<table width="409" border="0" >
</tr>
<tr align="center">
<td width="212" height=30 align="center"> <input type="button" name="button_init" value=" 操作1 " onclick="return datainit(this)"></td>
<td width="187" height=30 align="center"> <input type="button" name="button_" value=" 操作2 " onclick=""></td> </tr>
<tr> <td height=30 align="center"> <input type="button" name="button_print" value="操作3" onclick=""></td>
<td height=30 align="center"> <input type="button" name="button_print" value="操作4" onclick=""></td> </tr>
<tr><td height=30 colspan="2" align="right"> <input type="button" name="button_close" value="关闭窗口"
onclick="javascript:window.close();" ></td>
</tr>
</table>
</form>
这句不要也可以!