Jump to content

onclick and onload


lilman

Recommended Posts

I wrote this script and I don't see what is wrong with it. Here is the code

<html>
<head>
<title>
<script type="text/javascript">
function displayText()
{
document.write("You're using JavaScript");
}
</script>
</title>
</head>
<body onMouseDown="displayText()">
<h1>
<br />
<input name="color" type="button" onclick="document.bgcolor='pink'">
</h1>
</body>
</html>

and here is the error I get when I run it:

Line: 12
Char: 1
Error: Object excepted
Code: 0


Link to comment
https://forums.phpfreaks.com/topic/32237-onclick-and-onload/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.