开发者

Why does alert(navigator.appName) Lock-Up Safari

This...

alert(navigator.appName); 

...alerts the browser type in every other browser (google, opera, firefox, IE) but it completely locks-up safari and I h开发者_JS百科ave to go in and "end program" to stop it. Does any body know why?

here is the whole piece of code...

<script language="JavaScript">   
if (navigator.appName.indexOf("Netscape")> -1){  
    document.animation.ttt.rows=5;document.animation.ttt.cols=9;}// 
//alert(navigator.appName);
</script>

if I comment it out it is fine. If I alert it, it locks (only in Safari). Crazy?

(edit) updated to latest version... safari 5.0.3 (7533.19.4) no effect on lock up


Works fine in my Safari 5.0.3. Which version are you using? It has to be the code before or after the alert. For starters check your loops.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜