-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjs_bom.html
More file actions
74 lines (52 loc) · 1.27 KB
/
Copy pathjs_bom.html
File metadata and controls
74 lines (52 loc) · 1.27 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<h1> Browser Object Model (BOM) </h1>
<form>
<input type="text" id="txtFieldOnOpener" />
<button onclick="opneWin()">Open Popup</button>
<button onclick="return autoScroll()">autoScroll</button>
</form>
<script>
//history.go(-3);
//history.back();
//history.back();
//history.back();
//history.forward();
//document.location = 'http://yahoo.com';
document.location.replace('http://bing.com');
//alert(screen.width);
//alert(screen.height);
//alert(screen.availWidth);
//alert(screen.availHeight);
//alert(screen.pixelDepth);
//alert(screen.colorDepth);
//'use strict'
//console.log(this);
//console.log(window);
//console.log(self);
function atest(){
console.log(this);
}
//atest()
//var aTest = new atest();
//var popup = "";
//new window
function opneWin(){
//window.title="Title set from javascript";
console.log(screen.width);
console.log(screen.height);
/*
popup = window.open('js_popup.html','cm','height=200, width=300, scrollbars=1');
//alert('test');
//popup.document.getElementById('txtFieldOnPopup').value = 'I am set from opener';
popup.moveTo(100,200);
//sleep(500);
popup.moveBy(50,100);
popup.resizeTo(200,300);
popup.resizeBy(100,100);
//alert('sd');
*/
}
function autoScroll(){
popup.scrollBy(100,100);
return false;
}
</script>