ch************* **@gmail.com wrote:
Thanks for your code. But its not working in Netscape, same problem
In addition to my code, see Richard's answer. Instead of
<SCRIPT LANGUAGE="JScri pt">
(which is MSIE-proprietary) you should use
<script type="text/javascript">
to have your code executed in both Netscape7 and MSIE (and
other browsers). A complete example document would be:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Script-Type"
content="text/javascript">
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
<title></title>
<script type="text/javascript">
function mouseclick(e) {
var what = e.target || e.srcElement;
if (what) alert("I was clicked on " + what.tagName);
}
</script>
</head>
<body onclick="mousec lick(event)">
<H1>Welcome!</H1>
<P>This is a very <B>short</B> document.
</body>
</html>
ciao, dhgm