我补充一点吧,我现在也想问同样的问题,我现在也遇到这种情况,在火狐上其他异常都可以解决,但是这个异常我还没有想到解决办法了
比如:<input type=text id=test name=test onfocus="test()">
function test()
{
   alert("hello!");
}
就算你就只有一条alert的语句,也会抛出一个异常,但不会影响功能的实现!
我补充的是否符合楼主的意思?
火狐的脾气真怪!
希望哪位高人可以帮我们解决一下!

解决方案 »

  1.   

    function test()
    {
      try{ alert("hello!");}catch{}
    }
    直接滤掉不行吗,我这没装firefox
      

  2.   

    关注ing
    没有环境!
    回去试下!
      

  3.   

    这个异常用try-catch不到!
    请高人出手!
      

  4.   

    鉴于test是js关键字,建议不要使用
      

  5.   

    [Exception... "'&frac34;n^' XULElement.selectedIndex &ouml;CP &sup3;' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: file:///C:/Documents%20and%20Settings/China/%D7%C0%C3%E6/a.html :: onfocus :: line 1" data: no]
    能正常执行,可是有错误显示~~1.5.0.8....
      

  6.   

    ff,1.5.0.8里会有这个错误,相类似的错误还有:
    <input onkeydown="if(event.keyCode==13){this.blur();}">
    <input onblur="if(!confirm('真的要离开吗')){this.focus();}">
    ...
    分析可能是事件本的结果和script的结果不一致时出现的问题。
    加了preventDefault/return false也不顶用.
    --------------继续关注中...
      

  7.   

    没有ff所以只能猜测原因。
    onfocus里面用alert中断,导致会onfocus两次,有可能是这个原因。以前在ie下面测试一个onfocus和onblur和tab按钮地执行顺序推测的。
      

  8.   

    2.0确实没有这个问题!
    不单单是alert
    其他语句也会啊 
    例如:
    <input type=text id=test1 name=test1 onfocus="test()">
    <input type=text id=test2 name=test2 >
    function test()
    {
       document.getElementById("test2").focus();
    }
      

  9.   

    2.0已经修复了,记得1.5版本有。
    以前在Mozilla中国中心(http://www.mozilla.org.cn/)看到关于这个异常的详细解释了的,不知道为什么讨论区现在进不去...
      

  10.   

    FF2.0的event也还有一大堆问题。
    一些简单的需求都无法完成,
    让人失望。
    -------
    <input onblur="if(!confirm('真的要离开吗')){this.focus();}">