1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<html>
<head><title>This is a simple test page</title>
<script>
function simulateClick(target) {
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window,
0, 0, 0, 0, 0, false, false,
false, false, 0, null);
return target.dispatchEvent(evt);
}
function navigateInNewTab() {
return simulateClick(document.getElementById("bad_link"));
}
</script>
</head>
<a href="https://127.0.0.1:9666/files/ssl/google.html" id="bad_link" target="_blank">This is a bad link</a>
</html>
|