以下のコードでパスワード文字の判定をし、画像の出し分け処理をしているですが、Chromeのみ src ='unknown' となり、画像切り替えができない状態です。考えられ得る原因はありますでしょうか?どなたかご教示いただけますでしょうか?
よろしくお願い致します。
htmlここに言語を入力
1function outputResult() 2{ 3 var strPassword= $("#passwd").val(); 4 charPassword = strPassword.split(""); 5 6 if (strPassword == "") 7 { 8 $("#indicatorImg").attr("src", ""); 9 $("#indicatorText").text(""); 10 } 11 else if (charPassword.length < minPasswordLength) 12 { 13 $("#indicatorImg").attr("src", ""); 14 $("#indicatorText").text(""); 15 } 16 else if ((!num.Lower || !num.Numbers) && (!num.Upper || !num.Numbers)) 17 { 18 $("#indicatorImg").attr("src", ""); 19 $("#indicatorText").text(""); 20 } 21 else if (score<50) 22 { 23 $("#indicatorImg").attr("src", "img/indicator_weak.gif"); 24 $("#indicatorText").text(":低"); 25 } 26 else if (score>=50 && score<75) 27 { 28 $("#indicatorImg").attr("src", "img/indicator_strong.gif"); 29 $("#indicatorText").text(":中"); 30 } 31 else if (score>=75 && score<100) 32 { 33 $("#indicatorImg").attr("src", "img/indicator_stronger.gif"); 34 $("#indicatorText").text(":高"); 35 } 36 else if (score>=100) 37 { 38 $("#indicatorImg").attr("src", "img/indicator_strongest.gif"); 39 $("#indicatorText").text(":最高"); 40 } 41} 42 43 44
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/01/18 14:03