<script language="javascript">
function checkinput()
{
if document.thisform.server.value=="http://www1.ab.com/login.5d"{
location.href="http://www1.ab.com/login.5d";
return true;
}
if document.thisform.server.value==="http://vip1.ab.com/login.5d"{
location.href="http://vip1.ab.com";
return true;
}
}
</script><html><body onsubmit="return checkinput()">
<form name="thisform"><table><tr><td>
用 户 <input type="text" name="username"><br>
密 码 <input type="password" name="pwd"><br>
服务器 <select name="server">
<option value="http://www1.ab.com/login.5d">www1.ab.com</option>
<option value="http://vip1.ab.com/login.5d">vip1.ab.com</option>
</select><br>
<input type="submit" value="OK">
</td></tr></table></form>
</html></body>仅仅供参考,我是新手,互相帮助哈!
function checkinput()
{
if document.thisform.server.value=="http://www1.ab.com/login.5d"{
location.href="http://www1.ab.com/login.5d";
return true;
}
if document.thisform.server.value==="http://vip1.ab.com/login.5d"{
location.href="http://vip1.ab.com";
return true;
}
}
</script><html><body onsubmit="return checkinput()">
<form name="thisform"><table><tr><td>
用 户 <input type="text" name="username"><br>
密 码 <input type="password" name="pwd"><br>
服务器 <select name="server">
<option value="http://www1.ab.com/login.5d">www1.ab.com</option>
<option value="http://vip1.ab.com/login.5d">vip1.ab.com</option>
</select><br>
<input type="submit" value="OK">
</td></tr></table></form>
</html></body>仅仅供参考,我是新手,互相帮助哈!
用 户 <input type="text" name="username"><br>
密 码 <input type="password" name="pwd"><br>
服务器 <select name="server" onchange="fun(this.value)">
<option value="http://www1.ab.com/login.5d">www1.ab.com</option>
<option value="http://vip1.ab.com/login.5d">vip1.ab.com</option>
</select><br>
<input type="submit" value="OK">
</td></tr></table></form>
<script>
function fun(va){doucment.form1.action=va
document.form1.submit()}
</script>
用 户 <input type="text" name="username"><br>
密 码 <input type="password" name="pwd"><br>
服务器 <select name="server" onchange="this.form.action=this.value">
<option value="http://www1.ab.com/login.5d">www1.ab.com</option>
<option value="http://vip1.ab.com/login.5d">vip1.ab.com</option>
</select><br>
<input type="submit" value="OK">
</td></tr></table></form>简化了下~~~