邱金金 2017-02-06 07:42 采纳率: 33.3%
浏览 2794
已采纳

wince 6.0 模拟器在win10系统下不能联网

![图片说明](https://img-ask.csdn.net/upload/201702/06/1486366922_701774.png)图片说明

  • 写回答

4条回答 默认 最新

  • 邱金金 2017-02-08 10:42
    关注

    <!DOCTYPE html>

    < head>
    < script src="http://libs.baidu.com/jquery/2.0.0/jquery.js">
    < style>
    input{
    width: 20px;
    }
    .btn{
    clear:both;width:100px;height:30px;background: #c0b7b0;border-radius: 3px;color:#F0F0F0;
    text-align: center;line-height: 30px;
    }
    < /style>
    < /head>
    < body>
    < div style="float:left;">
    < span id="spMobileHeader">
    < /div>
    < div style="float:left;">
    < input type="text" maxlength="1" onkeyup="changefocus(1);">
    < input type="text" maxlength="1" onkeyup="changefocus(2);">
    < input type="text" maxlength="1" onkeyup="changefocus(3);">
    < input type="text" maxlength="1" onkeyup="checkMobile();">
    < /div>
    < div style="float:left;">
    < span id="spMobileEnd">
    < /div>
    < div id="testBtn" class="btn">提交
    < /body>
    < script type="text/javascript">
    $(function (){
    var mobile="12345678911"; //这是后台传过来的,我写死的,你拿到后自己变掉就可以了
    $("#spMobileHeader").text(mobile.substring(0,4)); //显示前4个
    $("#spMobileEnd").text(mobile.substring(8,11)); //显示后3个
    });

    function changefocus(index){
        $("input").each(function (i){
            if (i==index){
                $(this).focus();
            }
        });
    }
    function checkMobile(){
        var mobile="12345678911"; //这是后台传过来的
        var inputMobile="";
        $("input").each(function (i){
            inputMobile+=$(this).val();
        });
        var contrastMoblie=mobile.substring(4,8);
        if (inputMobile==contrastMoblie){
            /*
            在这里做你需要做的事,我只是改了下按钮的颜色
            */
            $("#testBtn").css("background","#960019");
            $("#testBtn").css("color","white");
        }
    }
    
    $("input").keyup(function(e){
        //退格键
        if(e.keyCode==8){
            $(this).focus();
        }
    })
    

    < /script>
    < /html>

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度