Alert Box
Using Windows in Note Pad I typed out Java Script instructions for showing an alert box in a browser. It works. But when I copied the exact instructions and placed it in the Text Editor on my Mac Book Pro I cannot get Fire Fox to show the alert box, instead it opens the file. Here is the Java Script script:
<html>
<head>
<script type="text/javascript">
function show_alert()
{
alert("Hello! I am an alert box!");
}
</script>
</head>
<body>
<input type="button" onclick="show_alert()" value="Show alert box" />
</body>
</html>
What am I doing wrong. Please help.

2 Comments
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now