-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path11-js-window.html
59 lines (32 loc) · 1.26 KB
/
11-js-window.html
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>JS window object</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
<style>
input {
margin: 10px;
}
</style>
</head>
<script>
function myResize(){
my=open('', '', 'width=100, height=100');
my.resizeTo(400, 400);
my.focus();
}
</script>
<body>
<div class="container">
<h1>JS window object</h1>
<input type="button" onclick="alert('Aloha')" value="alert()" class="btn btn-lg btn-primary">
<input type="button" onclick="confirm('Should I do that?')" value="confirm()" class="btn btn-lg btn-success">
<input type="button" onclick="open('http://www.vse.cz', '', 'width=200, height=200')" value="open()" class="btn btn-lg btn-info">
<input type="button" onclick="window.close()" value="close()" class="btn btn-lg btn-danger">
<input type="button" onclick="print()" value="print()" class="btn btn-lg btn-warning">
<input type="button" onclick="myResize()" value="resize()" class="btn btn-lg btn-info">
</div>
</body>
</html>