1,html内容部分
2,兼容火狐与IE浏览器的代码:
<script> /** * 取得select中的值 * edit www.jb200.com */ 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("请选择正确的大赛"); } } </script>
不兼容:
<script> function chooseGeme(){ var gameoid = document.getElementById("games").value; if(gameoid!=""){ window.location.href='userExternal.do?method=choseUserForward&type=1&gameoid='+gameoid; }else{ alert("请选择正确的大赛"); } } </script>