javascript实现跳转菜单
这里要做的是,省略Go There按钮,选择菜单项后,直接跳转。
Html代码
[html]
<!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=utf-8" />
<title>转移菜单</title>
<script type="text/javascript" src="转移菜单.js"></script>
</head>
<body>
<form>
<select id="newLocation">
<option selected="selected" value="">Select a topic</option>
<option value="topic1.html">topic1</option>
<option value="topic2.html">topic2</option>
<option value="topic3.html">topic3</option>
<option value="topic4.html">topic4</option>
<option value="topic5.html">topic5</option>
</select>
<!--当浏览器不支持javascript或者禁用脚本运行时被调用-->
<noscript>
<input type="submit" value="Go There!"/>
</noscript>
</form>
</body>
</html>
<!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=utf-8" />
<title>转移菜单</title>
<script type="text/javascript" src="转移菜单.js"></script>
</head>
<body>
<form>
<select id="newLocation">
<option selected="selected" value="">Select a topic</option>
<option value="topic1.html">topic1</option>
<option value="topic2.html">topic2</option>
<option value="topic3.html">topic3</option>
<option value="topic4.html">topic4</option>
<option value="topic5.html">topic5</option>
相关新闻>>
- Javascript 兼容 IE6、IE7、FF 的“加入收藏”“设为首页”
- 好好学一遍JavaScript 笔记(一)——基础中的基础
- 好好学一遍JavaScript 笔记(二)——encode、数组、对象创建
- 好好学一遍JavaScript 笔记(三)——StringBuffer、prototype
- 好好学一遍javaScript 笔记(四)——Attribute、HTML元素、文档碎
- 好好学一遍JavaScript 笔记(五)——正则表达式基础
- 好好学一遍JavaScript 笔记(六)——正则表达式基础二
- 好好学一遍JavaScript 笔记(七)——RegExp对象与常用正则
- 好好学一遍JavaScript 笔记(八)——冒泡型事件、捕获型事件
- JavaScript详解
- 发表评论
-
- 最新评论 更多>>