-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclose window.html
More file actions
36 lines (28 loc) · 877 Bytes
/
close window.html
File metadata and controls
36 lines (28 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var mywin;
function OpenWindowFunction() {
mywin = window.open("", "MyWindow", "left=500, top=400,width=200,height=200")
}
function CloseWindowFunction() {
mywin.close()
}
function FocusWindowFunction() {
mywin.focus()
}
function BlurWindowFunction(){
mywin.blur()
}
</script>
</head>
<body>
<form name="form1">
<input type="button" value="Open Window" onclick="OpenWindowFunction()" />
<input type="button" value="Close Window" onclick="CloseWindowFunction()" />
<input type="button" value="focus Window" onclick="FocusWindowFunction()" />
<input type="button" value="Blur Window" onclick="BlurWindowFunction()" />
</form>
</body>
</html>