function Search(){
//如果前一个控件的值大于后一个控件的值(前提是后一个控件不是空,空的情况下不做任何处理)
if(document.forms[0].koteiFrom.value > document.forms[0].koteiTo.value && document.forms[0].koteiTo.value != ""){
alert('message内容');
var koteifrom = document.getElementById("koteiFrom");//控件的取得
var koteiTo = document.getElementById("koteiTo");//控件的取得
koteifrom.style.backgroundColor = "#ffcccc";//控件的背景色变为棕红色,处理结束
koteiTo.style.backgroundColor = "#ffcccc";
return;
}
document.forms[0].action="./xxxxxxxxAction.do";
document.forms[0].submit();
}
在html中有以下两个控件:
<td width="530px">
<html:select name="xxxxxxForm" property="koteiFrom" style="width:250px;" >
<html:optionsCollection name="SCOM" pro