js中window.open打开一个新的页面
作者:bea
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title her
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
/* 打开同一个新的页面,不会再次打开新页面 */
function open1(){
window.open("html01.html","aaa");
}
function open2(){
window.open("html02.html","aaa");
}
</script>
</head>
<body>
<a href="#" rel="external nofollow" rel="external nofollow" onclick="open1()">点击进入1</a>
<a href="#" rel="external nofollow" rel="external nofollow" onclick="open2()">点击进入2</a>
</body>
</html>
猜你喜欢
您可能感兴趣的文章:
- JavaScript Promise启示录
- 编写高性能JavaScript(译)
- 深入理解Javascript中this的作用域
- javascript实现在某个元素上阻止鼠标右键事件的方法和实例
- JavaScript弹出窗口方法汇总
- Javascript中3种实现继承的方法和代码实例
- jQuery判断checkbox是否选中的3种方法
- jquery判断浏览器后退时候弹出消息的方法
- jQuery根据ID获取input、checkbox、radio、select的示例
- JavaScript中跨域调用Flash的方法
- jQuery实现的一个自定义Placeholder属性插件
- javascript中解析四则运算表达式的算法和示例
- javascript实现的平方米、亩、公顷单位换算小程序
- jquery访问ashx文件示例代码
- jQuery实现的一个tab切换效果内部还嵌有切换
- JavaScript动态改变HTML页面元素例如添加或删除
- 网页运行时提示对象不支持abigimage属性或方法
- js中直接声明一个对象的方法
- 点击标签切换和自动切换DIV选项卡