struts中提交表单按钮,为什么必须点击2次才能提交

<%@pagelanguage="java"contentType="text/html"pageEncoding="UTF-8"%><%@taglibprefix="s... <%@ page language="java" contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<HTML>
<HEAD>
<TITLE>试题信息管理</TITLE>

<script type="text/javascript">
function change(){
document.getElementById("examQuestion.strExamQuestionType").value=document.getElementById("examQuestion.strExamTypeId").value;
}
</script>
</HEAD>
<body>
<s:form name="examQuestion" method="post" theme="simple" target="Frame" onsubmit="return v.exec()" namespace="/examQuestion" action="save?isNew=true" enctype ="multipart/form-data">

<table class="query" ><tr>
<td class="query_left_td03">附件名称:</td>
<td class="query_right_td03">
<s:textfield cssClass="textbox" name="examQuestionAttachment.strAttachmentName" maxlength="100"/>
</td>
<td class="query_left_td03">附件简述:</td>
<td class="query_right_td03" colspan="3">
<s:textarea name="examQuestionAttachment.strAttachmentDescription" cssClass="textarea"></s:textarea>
</td>
</tr>
<tr>
<td class="query_left_td03">附件:</td>
<td class="query_right_td03" colspan="5">
<input type="file" name="file" id="file"/>
<s:textfield name="examQuestionAttachment.strAttachment" cssClass="file_textbox" readonly="true"/>
<input name="button" type='button' class="button_out"
onClick='document.all.file.click();document.all("examQuestionAttachment.strAttachment").value=document.all("file").value;'
onMouseOver="this.className='button_over'"
onMouseOut="this.className='button_out'"
value='浏览...'>
<input name="button2" type="button" class="button_out"
onClick='document.all("examQuestionAttachment.strAttachment").value="";document.all("examQuestionAttachment.strAttachment").outerHTML=document.all("examQuestionAttachment.strAttachment").outerHTML;'
onMouseOver="this.className='button_over'"
onMouseOut="this.className='button_out'"
value="删除">
</td>
</tr>
</table>
<table class="button_table" >
<tr>
<td>
<s:submit type="submit" cssClass="button_out"
onmouseover="this.className='button_over'"
onmouseout="this.className='button_out'"
value="提交" />
<input type="button" class="button_out"
onMouseOver="this.className='button_over'"
onMouseOut="this.className='button_out'"
onClick="javascript:history.back();" value="返回" >
</td>
</tr>
</table>
</s:form>
</body>
</html>
展开
 我来答
opensky010
2009-08-18 · TA获得超过466个赞
知道小有建树答主
回答量:981
采纳率:0%
帮助的人:304万
展开全部
v.exec()方法贴出来
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式