My javascript does not work in any browser except windows IE... WHY

Please just give me an example of some javascript that works in mozilla

Here is example of my source...

<script>
 var x = 400;
 alert(x);
 alert("This works in IE, but not Mozilla, why!!!!!!!!??????????");
</script>

Sorry... I did not realise that this site had a web development site... Don't ask how, but I didn't.
I tried deleteing this, but I don't know how or if I can...

on each post there is option "flag bad post", in message just write something like "please move to different forum" best give it name of forum.
So now you can do it

try putting :

<script type="text/javascript">
(what you had before)
</script>

also make sure; the script is inside a <body> or <head> element inside an <html> element. IE can be a bit lax when it comes to what is and isn't acceptable HTML; most browsers are less forgiving.

I figured that was the problem, but I'm just a lazy programmer... J.K., but I had no idea that those were required...