运行代码 缩小
汉王
HTML代码
复制 格式化 注释 注释 清空
放大
AخA
 
1
<html>
2
<script language=JavaScript> 
3
<!--
4
function click() {
5
if (event.button==2) {
6
window.open('#','popwindows',"toolbar=no,menubar=no,width=200,height=200")
7
}
8
}
9
document.onmousedown=click
10
//-->
11
</script>
12
<head>
13
<meta http-equiv="Content-Language" content="zh-cn">
14
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
15
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
16
<meta name="ProgId" content="FrontPage.Editor.Document">
17
<title>js弹出窗口代码</title>
18
<style> 
19
<!--
20
body{ font-family: Verdana; color: #000080; font-size: 9pt }
21
-->
22
</style>
23
</head>
24
<body onkeydown="show()">
25
<p align="center">请点右键</p>
26
</body>
27
</html>
CSS代码
复制 格式化 注释 注释 颜色 清空
放大
CSS代码...
x
 
1
JS代码
复制 格式化 注释 注释 清空
放大
JS代码...
xxxxxxxxxx
1
 
1
名称
Js弹出窗口代码,window.open方法
分类
网站常用
描述
Js使用window.open方法弹出窗口,貌似现在都不这么用了,不过作为学习JavaScript来说,了解window.open的用法还是必要的,通过本代码你肯定能学会Js通过window.open弹出窗口的方法。
收藏