textInput 事件

2017-06-19 14:00:00
admin
原创
463
<!DOCTYPE html>
<html>
<head>
    <title>TextInput Event Example</title>
    <script type="text/javascript" src="http://code.ybao.org/demo/js/EventUtil.js"></script>
</head>
<body>
    <input type="text" id="myText" />
    <p>This example only works in browsers that support the <code>textInput</code> event.</p>
    <script type="text/javascript">
        var textbox = document.getElementById("myText");
        EventUtil.addHandler(textbox, "textInput", function(event){
            event = EventUtil.getEvent(event);
            alert(event.data);     
        });
    </script>
</body>
</html>
  • QQ讨论群
  • 关注微信
    • 欢迎咨询
    • 欢迎加入QQ群 16506021
  • 公众号:源宝网络