根据下拉列表的内容选择跳转页面 静态页面中的下拉列表有一些值,例如人名什么的,每个名字有着不同的权限,选定一个名字,点击登录则跳转到一个页面中,不同的名字跳到不同的页面,怎么实现啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><script type="text/javascript">//<![CDATA[function gotoUrl(){ var name = document.getElementById('userName').value; switch(name) { case 'Andi': window.location.href = 'http://test.com/andi.html'; break; case 'Tom': window.location.href = 'http://test.com/tom.html'; break; case 'Kate': window.location.href = 'http://test.com/kate.html'; break; default: alert("name error!"); }}//]]></script></head><body><select name="userName" id="userName"><option value="Andi">andi</option>><option value="Tom" >Tom</option><option value="Kate">Kate</option></select><input type="button" value = " 登 陆 " onclick="gotoUrl();"></body></html> setInterval与clearInterval的 用法 如何实现google地图拖拽的时候旁边的文本框中的经纬值也跟着变化 javascript判断email的输入 关于用mse调试脚本的问题 58同城赶集网的cookie记住网站城市分页代码怎么写? <a href="#top"> 在javascript 里怎么把中划线 "-" 这个符号替换成空 ,另外一个是怎么用instr这个比较函数 如何利用客户端的按纽来改变iframe的Src 如何改变鼠标在浏览器窗口中的显示形状? 可以用javascript代码修改<a href="">中的href属性吗? 关于打印 JQUERY的问题
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
//<![CDATA[
function gotoUrl()
{
var name = document.getElementById('userName').value;
switch(name)
{
case 'Andi':
window.location.href = 'http://test.com/andi.html';
break;
case 'Tom':
window.location.href = 'http://test.com/tom.html';
break;
case 'Kate':
window.location.href = 'http://test.com/kate.html';
break;
default:
alert("name error!");
}
}
//]]>
</script>
</head><body>
<select name="userName" id="userName">
<option value="Andi">andi</option>>
<option value="Tom" >Tom</option>
<option value="Kate">Kate</option>
</select>
<input type="button" value = " 登 陆 " onclick="gotoUrl();">
</body>
</html>