<html> <head> <title>jquery监听input text内容的变化,兼容多种浏览器</title> </head> <body> <span id="content">neirong</span> <div> <input type="yonghuming" id="yonghuming"/> <script>$('#yonghuming').bind('input propertychange', function() { $('#content').html('共有'+$(this).val().length + ' 个字符'); });</script> </body> </html>