火狐取得select的值
? <SELECT name="games" style="width:143px">
?? <option value="2c90a0d728f7ae080128f7aeb9560001">test100大赛1</option> ?
?? <option value="2c90a0d728f7ae080128f7b30f630012">test100大赛1</option>
?? <option value="2c90a0d728f7ae080128f7b49dde0023">test100大赛1</option>
?? <option value="2c90a0d728f7ae080128f7b5b4250034">test100大赛1</option>
?? <option value="2c90a0d728f7c5330128f7c8f69b001c">222test100大赛2222 </option>
?? <option value="2c90a0d728f7dde30128f7de8a1b0001">33test大赛</option> ??
</SELECT>
?
?火狐 IE兼容:
function chooseGeme(){
? var games =document.getElementsByName("games")[0];
? var gameoid = games.options[games.selectedIndex].value;
? if(gameoid!=""){
?? window.location.href='userExternal.do?method=choseUserForward&type=1&gameoid='+gameoid;
? }else{
??? alert("请选择正确的大赛");
? }
? }
不兼容:
? function chooseGeme(){
? var gameoid =? document.getElementById("games").value;
? if(gameoid!=""){
?? window.location.href='userExternal.do?method=choseUserForward&type=1&gameoid='+gameoid;
? }else{
??? alert("请选择正确的大赛");
? }
? }