我试了,在firefox可以.
不过就算可以,我都建议你改成
<input type="text" value="aaa" onfocus="javascript:alert('focus');" id="t1t"/>
<input type="text" id="t2t" value="bbb" onfocus="document.getElementById('t1t').onfocus();" />

解决方案 »

  1.   

    javascript:document.getElementById('t1t').onfocus()改成这个可以了…… 
      

  2.   

    我试了,可以运行,没发现什么问题
    版本是:Firefox/3.0.5
      

  3.   

    如果直接这样改,会死循环<html>  
    <head>
    <script type="text/javascript">
      function test (t1t){
        var s = document.getElementById(t1t);
    s.focus();
    return false;
      
      }
     </script>
     </head>
    <body>
    <form name="form1" action="" method="post">
    <input type="text" value="aaa"  id="t1t"/>
    <input type="text" id="t2t" value="bbb" onfocus="test('t1t');" /> </body>
    </html>
      

  4.   

    如果直接这样改,会死循环<html>  
    <head>
    <script type="text/javascript">
      function test (t1t){
        var s = document.getElementById(t1t);
    s.focus();
    return false;
      
      }
     </script>
     </head>
    <body>
    <form name="form1" action="" method="post">
    <input type="text" value="aaa"  id="t1t"/>
    <input type="text" id="t2t" value="bbb" onfocus="test('t1t');" /> </body>
    </html>