<input type="text" id="num"/><input type="button" onclick="skip()" value="跳转"> <script type="text/javascript"> function skip(){ var num = document.getElementById("num").value; if(num==1){ window.location.href = "1.html"; }else if(num==2){ window.location.href = "2.html"; } } </script>
追问呀,没一点帮助
本回答被提问者和网友采纳