楼上可以,还有onchange  onblur

解决方案 »

  1.   

    onchange="JavaScript:aa(bb);"
    onblur="JavaScript:aa(bb);"
    aa()你在JavaScript中写好的事件的Function
    bb你要传的传数,可要,可不要
      

  2.   

    <html>
    <head>
    <script language=JavaScript>
    <!--
    function checkit()
    {
    alert("这是一个例子");
    }
    </script>
    </head><body>
    <form name="form1" method="post" action="">
      <input type="text" name="textfield" onBlur="return checkit()">
      <input type="text" name="textfield2">
    </form>
    </body>
    </html>
    试试看吧!
      

  3.   

    <input type="text" onblur="alert('hello');">
      

  4.   

    好像不行吗?我的是在struts下写的,我的代码是这样的:
     <html:text property="price" styleClass="button" onblur="pagecalculate()" size="10"/>
    javascript的函数我就不贴出来了