时间:2021-07-01 10:21:17 帮助过:3人阅读
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>RunJS</title>
<script id="jquery_183" type="text/javascript" class="library" src="/js/sandbox/jquery/jquery-1.8.3.min.js"></script>
</head>
<body>
<h1 >
实时监测input中值的变化
</h1>
<input type="text" id="username" autoComplete='off'>
<div id="result"></div>
</body>
</html>$(function(){
$('#username').bind('input propertychange', function() {
$('#result').html($(this).val().length + ' characters');
});
})上面是我整理给大家的,希望今后会对大家有帮助。
相关文章:
给nodejs里密码加密有哪几种方式
js 判断客户端能否上网详解
给nodejs里密码加密有哪几种方式
以上就是有关js 实时监听input中值变化(图文教程)的详细内容,更多请关注Gxl网其它相关文章!