JSP界面中如何时时的读取界面中输入的变量?

解决方案 »

  1.   

    js 的方法  onpropertyChange()  試試
      

  2.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <style type="text/css"></style>
    <script>
    function realtimevalue(){
    alert(document.getElementById("values").value);
    }
    </script>
    </head><body>
    <input type="text" id="values" onkeyup="realtimevalue()"/>
    </body>
    </html>
      

  3.   

    感觉用onchange好点,onkeyup我不用键盘输入你咋办。