密码显示隐藏

 var flag = 0;
    var pwdxs = $("#pwdxs");
    var iconposition = $("#iconposition");
    $(".icon-position").click(function () {
        if(flag==0){
            pwdxs.prop("type","text");
            iconposition.html('<use xlink:href="#icon-xianshi"></use>');
            flag=1;
        }else{
            pwdxs.prop("type","password");
            iconposition.html('<use xlink:href="#icon-wuxingde2"></use>');
            flag=0;
        }
    })

 

上一篇:html 列表


下一篇:javaweb基础概念