大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

js小键盘需求

/* container */
    #container {
        margin: 100px auto;
        width: 488px;
    }

    #keyboard {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #keyboard li {
        float: left;
        margin: 0 5px 5px 0;
        width: 40px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        background: #fff;
        border: 1px solid #f9f9f9;
        cursor: pointer;
        -moz-border-radius: 5px;
        -webkit-border-radius: 5px;
        font-size: 20px;
    }
    
        #keyboard li:hover {
            position: relative;
            top: 1px;
            left: 1px;
            border-color: #e5e5e5;
            background: #FFF1C2;
        }
    
    #keyboard .delete {
        width: 180px;
        font-size: 20px;

js代码

成都创新互联公司专注于网站建设|网页维护|优化|托管以及网络推广,积累了大量的网站设计与制作经验,为许多企业提供了网站定制设计服务,案例作品覆盖垃圾桶等行业。能根据企业所处的行业与销售的产品,结合品牌形象的塑造,量身策划品质网站。

 $(function () {
        $("#Batchid").bind('focus', function () {           
            //键盘显示
            $("#container").show();
        });
        //点击
        $(".letter").bind('click', function () {
            $("#Batchid").val($("#Batchid").val() + "" + $(this).html());
        });
        //删除
        $("#delete").bind('click', function () {
            var html = $("#Batchid").val()

            $("#Batchid").val(html.substr(0, html.length - 1));
        });
        
    });

页面代码

 
            
                
                    
                        
                            

商品码:

                                                                                                                                                                                                       

批    号:

                                                                                                                                                          
                                          
        
                                      1                 2                 3                 4                 5                 6                 7                 8                 9                 0                                 q                 w                 e                 r                 t                 y                 u                 i                 o                 p                 a                 s                 d                 f                 g                 h                 j                 k                 l                                 z                 x                 c                                 v                 b                 n                 m                 删除                      

最后效果 搞了两个多小时 

js 小键盘需求


网站标题:js小键盘需求
浏览路径:http://dzwzjz.com/article/pohcoh.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP