javascript problem



Hi,

Should not this script work with IE?
Could my Javascript module in ie be corrupted?


<SCRIPT type="javascript" language="JavaScript">
var in =1;

switch( in ){
case 1:
alert(1);
break;

case 2:
alert(2);
break;

default:
document.write(' dddddddd ');
}
</SCRIPT>
Thanks for your attention

--
Jean Pierre Daviau
--
Easyphp1.8
Apache1.3.24
DEVC++, borland 5.5
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
http://www.jeanpierredaviau.com


.



Relevant Pages

  • Re: changing class properties
    ... switch some parts of the page off. ... var child = children; ... var eClass, eClasses, j; ... Lightly tested in Firefox & IE, it should work in nearly all browsers, but care needs to be taken with class attribute values - only single spaces between class names and none before and after. ...
    (comp.lang.javascript)
  • Re: Tcl Switch case
    ... the 'string' and the second being the 'pattern body list'. ... is *necessarily* a syntax error. ... where var is some form of input. ... switch $var ...
    (comp.lang.tcl)
  • javascript corrupted?
    ... I tried this in iexplorer, mozilla, opera. ... var in = 1; ... switch(in){ ...
    (comp.lang.javascript)
  • trying to loop an xml page from ajax
    ... var xmldoc = httpRequest.responseXML; ... // create a DIV element, ... // append your newly created element to an already ... I tried to switch the while to a for - ...
    (comp.lang.javascript)
  • Re: changing class properties
    ... > switch some parts of the page off. ... Amend the style sheet through script:- ... I.e. identify your class in a styleSheet thus:- ... var rules; ...
    (comp.lang.javascript)

Loading