Warning: Undefined array key "adf" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 41

Warning: Undefined array key "sim_pages" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 42

#笔记#js 实时监听input中值变化


Warning: Undefined array key "adf" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 41

Warning: Undefined array key "sim_pages" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 42

源码来自网路,大概简单修改了下,DEMO在最底下

效果图:

 

 

 

 

HTML:

 

<!DOCTYPE html>  
<html>  
    <head>  
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
        <title>RunJS</title>  
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>  
    </head>  
    <body>  
        <h1 >  
            实时监测input中值的变化  
        </h1>  
        <input type="text" id="username" autoComplete='off'>  
        <div id="result"></div>  
    </body>  
</html> 

js:

 

$(function() {

    $('#username').bind('input propertychange', function() {
        $('#result').html($(this).val().length + ' characters');
    });

})

 

>>查看Demo<<

/www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 41

Warning: Undefined array key "sim_pages" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 42
源码来自网路,大概简单修改了下,DEMO在最底下 效果图:         HTML:   <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Ty……" target="_blank">

D.Young

85后 / 代码散修 / 平面设计 / 一个老父亲 / 直男 / 被认为胖

相关推荐

发表评论

您的电子邮箱地址不会被公开。

微信扫一扫,分享到朋友圈

#笔记#js 实时监听input中值变化
返回顶部

显示

忘记密码?

显示

显示

获取验证码

Close