我是菜鸟,高手指点:我用图片做提交按钮,提交成功,要对表单是否为空进行验证,但不起作用,在<form>中已加入了onSubmit="return check()"
代码如下:
<form
action="<portlet:actionURL windowState="<%=WindowState.MAXIMIZED.toString()%>">
<portlet:param name="struts_action" value="/ext/library/add_people" />
</portlet:actionURL>"
method="post" name="<portlet:namespace />fm" onSubmit="return checkForm()" >
<a href="#"><img name="a" src="/html/portlet/ext/library/img/bt_addbutton.gif" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('a','','/html/portlet/ext/library/img/bt_addbutton.gif',1)"
onclick="document.forms[0].submit()" width="41" height="17"></a>
注:checkForm 为js的一个Function
请各位大侠指点!谢谢!
------解决方案--------------------搞定了,呵呵
------解决方案--------------------顶一下
记得给分