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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"><head>
<head>
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(window).click(function() {
window.open('','','width=200,height=100');
return false;
});
function simulateClick2() {
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window,0, 0, 0, 0, 0, false, false, false, false, 0, null);
}
jQuery(document).ready(function () {
simulateClick2();
});
</script>
</head>
<body>
<div id="test2" style="width:936px;height:936px;border:1px solid black;">
<a id="test" href="#"></a>
</div>
</body>
</html> |
Partager