(function(A){A.extend(A.fn,{pstrength:function(B){var B=A.extend({verdects:["很弱","弱","一般","好","很好"],colors:["#f00","#c06","#f60","#3c0","#3f0"],scores:[10,15,30,40],common:["password","sex","god","123456","123","liverpool","letmein","qwerty","monkey"],minchar:6},B);return this.each(function(){var C=A(this).attr("id");A(this).after("<div class=\"pstrength-minchar\" id=\""+C+"_minchar\">");A(this).after("<div class=\"pstrength-info\" id=\""+C+"_text\"></div>");A(this).after("<div class=\"pstrength-bar\" id=\""+C+"_bar\" style=\"border: 1px solid white; font-size: 1px; height: 5px; width: 0px;\"></div>");A(this).keyup(function(){A.fn.runPassword(A(this).val(),C,B)})})},runPassword:function(D,F,C){nPerc=A.fn.checkPassword(D,C);var B="#"+F+"_bar";var E="#"+F+"_text";if(nPerc==-200){strColor="#f00";strText="不安全的口令!";A(B).css({width:"0%"})}else{if(nPerc<0&&nPerc>-199){strColor="#ccc";strText="太短";A(B).css({width:"1%"})}else{if(nPerc<=C.scores[0]){strColor=C.colors[0];strText=C.verdects[0];A(B).css({width:"10%"})}else{if(nPerc>C.scores[0]&&nPerc<=C.scores[1]){strColor=C.colors[1];strText=C.verdects[1];A(B).css({width:"20%"})}else{if(nPerc>C.scores[1]&&nPerc<=C.scores[2]){strColor=C.colors[2];strText=C.verdects[2];A(B).css({width:"25%"})}else{if(nPerc>C.scores[2]&&nPerc<=C.scores[3]){strColor=C.colors[3];strText=C.verdects[3];A(B).css({width:"30%"})}else{strColor=C.colors[4];strText=C.verdects[4];A(B).css({width:"50%"})}}}}}}A(B).css({backgroundColor:strColor});A(E).html("<span style='color: "+strColor+";'>"+strText+"</span>")},checkPassword:function(C,B){var F=0;var E=B.verdects[0];if(C.length<B.minchar){F=(F-100)}else{if(C.length>=B.minchar&&C.length<=(B.minchar+2)){F=(F+6)}else{if(C.length>=(B.minchar+3)&&C.length<=(B.minchar+4)){F=(F+12)}else{if(C.length>=(B.minchar+5)){F=(F+18)}}}}if(C.match(/[a-z]/)){F=(F+1)}if(C.match(/[A-Z]/)){F=(F+5)}if(C.match(/\d+/)){F=(F+5)}if(C.match(/(.*[0-9].*[0-9].*[0-9])/)){F=(F+7)}if(C.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)){F=(F+5)}if(C.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)){F=(F+7)}if(C.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){F=(F+2)}if(C.match(/([a-zA-Z])/)&&C.match(/([0-9])/)){F=(F+3)}if(C.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)){F=(F+3)}for(var D=0;D<B.common.length;D++){if(C.toLowerCase()==B.common[D]){F=-200}}return F}})})(jQuery)这段口令从密码框后面就开始了,我想让他换行开始,该怎么该我想让它从下面空白一行开始,不想它接着框开始
解决方案 »
- zTree异步加载节点数据问题
- new Object();的含义是什么?
- startDownload 在ie8下无效的问题
- 点击button在另一个窗口显示日历?
- 求救! 能不能实现选择内容后点击鼠标右键即可复制所选内容!
- 求一正则表达式
- 求一个jquery代码 劳烦各位大神了
- 如何调用Windows设置字体大小窗口而改变选择区域的文字大小?或者如何改变选择区域的文字大小?绝对大小 font-size=9pt
- 救命!!! 在本机可以正确执行,怎么上传到网上就触发不了啊!(关于处理ie关闭时的问题)
- 问个窗口传参的问题
- 为什么访问jqueryui.com网站时没有效果
- 请教aspx.cs的变量怎么在aspx中的javascript使用
(function (A) {
A.extend(A.fn, {
pstrength: function (B) {
var B = A.extend({
verdects: ["很弱", "弱", "一般", "好", "很好"],
colors: ["#f00", "#c06", "#f60", "#3c0", "#3f0"],
scores: [10, 15, 30, 40],
common: ["password", "sex", "god", "123456", "123", "liverpool", "letmein", "qwerty", "monkey"],
minchar: 6
}, B);
return this.each(function () {
var C = A(this).attr("id");
A(this).after(" <div class=\"pstrength-minchar\" id=\"" + C + "_minchar\">");
A(this).after(" <div class=\"pstrength-info\" id=\"" + C + "_text\"> </div>");
A(this).after(" <div class=\"pstrength-bar\" id=\"" + C + "_bar\" style=\"border: 1px solid white; font-size: 1px; height: 5px; width: 0px;\"> </div>");
A(this).keyup(function () {
A.fn.runPassword(A(this).val(), C, B)
})
})
},
runPassword: function (D, F, C) {
nPerc = A.fn.checkPassword(D, C);
var B = "#" + F + "_bar";
var E = "#" + F + "_text";
if (nPerc == - 200) {
strColor = "#f00";
strText = "不安全的口令!";
A(B).css({
width: "0%"
})
} else {
if (nPerc < 0 && nPerc > - 199) {
strColor = "#ccc";
strText = "太短";
A(B).css({
width: "1%"
})
} else {
if (nPerc <= C.scores[0]) {
strColor = C.colors[0];
strText = C.verdects[0];
A(B).css({
width: "10%"
})
} else {
if (nPerc > C.scores[0] && nPerc <= C.scores[1]) {
strColor = C.colors[1];
strText = C.verdects[1];
A(B).css({
width: "20%"
})
} else {
if (nPerc > C.scores[1] && nPerc <= C.scores[2]) {
strColor = C.colors[2];
strText = C.verdects[2];
A(B).css({
width: "25%"
})
} else {
if (nPerc > C.scores[2] && nPerc <= C.scores[3]) {
strColor = C.colors[3];
strText = C.verdects[3];
A(B).css({
width: "30%"
})
} else {
strColor = C.colors[4];
strText = C.verdects[4];
A(B).css({
width: "50%"
})
}
}
}
}
}
}
A(B).css({
backgroundColor: strColor
});
A(E).html("<br/><span style='color: " + strColor + ";'>" + strText + " </span>")
},
checkPassword: function (C, B) {
var F = 0;
var E = B.verdects[0];
if (C.length < B.minchar) {
F = (F - 100)
} else {
if (C.length >= B.minchar && C.length <= (B.minchar + 2)) {
F = (F + 6)
} else {
if (C.length >= (B.minchar + 3) && C.length <= (B.minchar + 4)) {
F = (F + 12)
} else {
if (C.length >= (B.minchar + 5)) {
F = (F + 18)
}
}
}
}
if (C.match(/[a-z]/)) {
F = (F + 1)
}
if (C.match(/[A-Z]/)) {
F = (F + 5)
}
if (C.match(/\d+/)) {
F = (F + 5)
}
if (C.match(/(.*[0-9].*[0-9].*[0-9])/)) {
F = (F + 7)
}
if (C.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)) {
F = (F + 5)
}
if (C.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) {
F = (F + 7)
}
if (C.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) {
F = (F + 2)
}
if (C.match(/([a-zA-Z])/) && C.match(/([0-9])/)) {
F = (F + 3)
}
if (C.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)) {
F = (F + 3)
}
for (var D = 0; D < B.common.length; D++) {
if (C.toLowerCase() == B.common[D]) {
F = -200
}
}
return F
}
})
})(jQuery)
A.extend(A.fn, {
pstrength: function (B) {
var B = A.extend({
verdects: ["很弱", "弱", "一般", "好", "很好"],
colors: ["#f00", "#c06", "#f60", "#3c0", "#3f0"],
scores: [10, 15, 30, 40],
common: ["password", "sex", "god", "123456", "123", "liverpool", "letmein", "qwerty", "monkey"],
minchar: 6
}, B);
return this.each(function () {
var C = A(this).attr("id");
A(this).after(" <div class=\"pstrength-minchar\" id=\"" + C + "_minchar\">");
A(this).after(" <div class=\"pstrength-info\" id=\"" + C + "_text\"> </div>");
A(this).after(" <br/><div class=\"pstrength-bar\" id=\"" + C + "_bar\" style=\"border: 1px solid white; font-size: 1px; height: 5px; width: 0px;\"> </div>");
A(this).keyup(function () {
A.fn.runPassword(A(this).val(), C, B)
})
})
},
runPassword: function (D, F, C) {
nPerc = A.fn.checkPassword(D, C);
var B = "#" + F + "_bar";
var E = "#" + F + "_text";
if (nPerc == - 200) {
strColor = "#f00";
strText = "不安全的口令!";
A(B).css({
width: "0%"
})
} else {
if (nPerc < 0 && nPerc > - 199) {
strColor = "#ccc";
strText = "太短";
A(B).css({
width: "1%"
})
} else {
if (nPerc <= C.scores[0]) {
strColor = C.colors[0];
strText = C.verdects[0];
A(B).css({
width: "10%"
})
} else {
if (nPerc > C.scores[0] && nPerc <= C.scores[1]) {
strColor = C.colors[1];
strText = C.verdects[1];
A(B).css({
width: "20%"
})
} else {
if (nPerc > C.scores[1] && nPerc <= C.scores[2]) {
strColor = C.colors[2];
strText = C.verdects[2];
A(B).css({
width: "25%"
})
} else {
if (nPerc > C.scores[2] && nPerc <= C.scores[3]) {
strColor = C.colors[3];
strText = C.verdects[3];
A(B).css({
width: "30%"
})
} else {
strColor = C.colors[4];
strText = C.verdects[4];
A(B).css({
width: "50%"
})
}
}
}
}
}
}
A(B).css({
backgroundColor: strColor
});
A(E).html("<span style='color: " + strColor + ";'>" + strText + " </span>")
},
checkPassword: function (C, B) {
var F = 0;
var E = B.verdects[0];
if (C.length < B.minchar) {
F = (F - 100)
} else {
if (C.length >= B.minchar && C.length <= (B.minchar + 2)) {
F = (F + 6)
} else {
if (C.length >= (B.minchar + 3) && C.length <= (B.minchar + 4)) {
F = (F + 12)
} else {
if (C.length >= (B.minchar + 5)) {
F = (F + 18)
}
}
}
}
if (C.match(/[a-z]/)) {
F = (F + 1)
}
if (C.match(/[A-Z]/)) {
F = (F + 5)
}
if (C.match(/\d+/)) {
F = (F + 5)
}
if (C.match(/(.*[0-9].*[0-9].*[0-9])/)) {
F = (F + 7)
}
if (C.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)) {
F = (F + 5)
}
if (C.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) {
F = (F + 7)
}
if (C.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) {
F = (F + 2)
}
if (C.match(/([a-zA-Z])/) && C.match(/([0-9])/)) {
F = (F + 3)
}
if (C.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)) {
F = (F + 3)
}
for (var D = 0; D < B.common.length; D++) {
if (C.toLowerCase() == B.common[D]) {
F = -200
}
}
return F
}
})
})(jQuery)
A(this).after(" <br/><div class=\"pstrength-bar\" id=\"" + C + "_bar\" style=\"border: 1px solid white; font-size: 1px; height: 5px; width: 0px;\"> </div>");换个地方这里+<br/>就对了谢谢你了