jasonli
July 20th, 2007, 11:49 AM
In VS2005 asp.net project, I inserted a html page, and set it as start page. the code of html page is:
<html>
<head>
<title>onclick test</title>
<script type="text/javascript">
window.onclick = clickPage;
function clickPage()
{
alert("click event detected!");
}
</script>
</head>
<body>
<p>click and release the LH mouse button on this page.</p>
</body>
</html>
When I run it, click somewhere in webpage, the alert message doesn't show up. Why? Did I miss something?
<html>
<head>
<title>onclick test</title>
<script type="text/javascript">
window.onclick = clickPage;
function clickPage()
{
alert("click event detected!");
}
</script>
</head>
<body>
<p>click and release the LH mouse button on this page.</p>
</body>
</html>
When I run it, click somewhere in webpage, the alert message doesn't show up. Why? Did I miss something?