struts标签<html:select>选项javascript的判定问题!!!!!!!!!! 还是像以往javascript那么写不可以吗?if (document.forms[0].color.value==""){ alert(".............."); return false;} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html:submit property="submit" value="登陆" onclick="javascript:return check();"/>javascript:function check(){ if(document.getElementById("color").value=="1"){ alert("请选择颜色"); return false; }else return true;} <script language="javascript" type="text/javascript">function doSubmit(){thisForm = document.loginForm;if(thisForm.color.options[thisForm.color.options.selectedIndex].value=="1") { window.alert("请选择颜色!"); thisForm.color.focus(); return false; } thisForm.action="/nanbo/login2.do"; thisForm.submit();}<input type="button" name="submit1" value="提交" onclick="javascrip:doSubmit()"></script> 不好意思 </script> 贴错了,因该放到 <input>上面不过相信楼主看的懂 如何用 Java语言开发 监控摄像头程序.... spring mvc 使用多线程时报错 急急急!!! JNA能不能加载C++写的DLL? javaweb 问题 build文件报错。帮忙看看。。 程序员一般都熟悉几种语言? 寻找兼职工作,代做大学计算机毕业系统设计(java开发) 一个超简单小问题,但你未必能正确回答哦 请教关于WEBLOGIC7。0 LIB位置的问题 如何取得forward传过来的参数? 哪里有jsp的主页空间啊?? 收费的也可以 用struts validator进行客户端验证的问题--都快晕死了---
if(document.getElementById("color").value=="1"){
alert("请选择颜色");
return false;
}else
return true;
}
function doSubmit()
{
thisForm = document.loginForm;if(thisForm.color.options[thisForm.color.options.selectedIndex].value=="1")
{
window.alert("请选择颜色!");
thisForm.color.focus();
return false;
}
thisForm.action="/nanbo/login2.do";
thisForm.submit();
}<input type="button" name="submit1" value="提交" onclick="javascrip:doSubmit()">
</script>
贴错了,因该放到 <input>上面不过相信楼主看的懂