zl程序教程

您现在的位置是:首页 >  后端

当前栏目

js中window.open打开一个新的页面

JS 一个 页面 打开 open window
2023-06-13 09:15:41 时间
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=UTF-8">
<title>Inserttitlehere</title>
<scripttype="text/javascript">
/*打开同一个新的页面,不会再次打开新页面*/
functionopen1(){
window.open("html01.html","aaa");
}
functionopen2(){
window.open("html02.html","aaa");
}
</script>
</head>
<body>
<ahref="#"rel="externalnofollow"rel="externalnofollow"onclick="open1()">点击进入1</a>
<ahref="#"rel="externalnofollow"rel="externalnofollow"onclick="open2()">点击进入2</a>
</body>
</html>