This article mainly introduces JS to obtain the value of the select tag and compatible with IE and Firefox. Need friends can come to the reference, I hope to help you.
JSP code: Code as follows: <form id= "Search" > <select id= "jobselect" style= "width:200px;" Name= "Jobselect" > <s:if test= ' jobselect = null | | Jobselect = "" ' > <option selected= "selected" value= "-1" >--according to category--</option> </S: if> <s:else> <option value= "-1" >--selected by category--</option> </s:else> <s:iterator value= "Jobcat" status= "S" > <s:if test= "jobselect = Catkey" > &L T;option value= "<s:property value=" Catkey "/>" selected= "selected" > <s:property value= "Catcnname"/> </option> </s:if> <s:else> < Option value= "<s:property value=" Catkey "/>" > <s:property value= "Catcnname"/> </option> </s:else> </s:iterator> </select> <br/ > <selecT id= "Areaselect" style= "width:200px" name= "Areaselect" > <s:if test= ' areaselect = null | | Areaselect = "" ' > <option selected= "selected" value= "-1" >--by region--</option> </S :if> <s:else> <option value= "-1" >--Filter by Region--</option> </s:else> & nbsp <s:iterator value= "Workareacat" status= "S" > <s:if test= "areaselect = Areacat" > & Lt;option value= "<s:property value=" Areacat "/>" selected= "selected" > <s:property Value= "Catcnname"/> </option> </s:if> <s:else> & nbsp <option value= "<s:property value=" Areacat "/>" > <s:property value= "Catcnname"/> </option> </s:else> </s:iterator> </select> < Input class= "Send2" type= "button" onclick= "Validate () returN false "value=" query "/> <span style=" color:red; "mce_style=" color:red "id=" Requiredparam > </form> JS code: Code as follows: <mce:script type= "Text/javascript" ><!-- validate = function ( { var jobselect var areaselect var search = document.getElementById ("search"); for (Var i=0; i<search.jobselect.length;i++) { if (search.jobselect[i].selected) { Jobselect = Search.jobselect[i].value; &NBSP} } for (Var i=0;i<search.areaselect.length;i++) { if (search.areaselect[i). Selected) { Areaselect = Search.areaselect[i].value } } if (Jobselect = 1 && Amp Areaselect = = 1) { document.getelementbyid (' Requiredparam '). InnerHTML = ' Please set filter criteria after query '; return ; } var param = { target: ' ... /index/jobframe.action ', method: 'Post ' form : ' Search ', div  : ' Box ' &NBSP} var as = new Ajaxsender (param); as.send () }//--></mce:script