それが問題です。
私の頭:
<script language="JavaScript">
function checkIt(){
var pass = document.form1.value;
if (pass == "1234")
{
alert("Please input a Value");
return false;
}
else
{
alert('Code has accepted : you can try another');
return true;
}
}
window.onload = checkIt();
</script>
私の体:
<form action="#" method="post" id="form1" onsubmit="checkIt();">
<input type="password" id="sn" name="sn" placeholder="Enter Your Password">
<img src="ok.gif" onclick="submit();" style="cursor: pointer;">
</form>
誰が私が間違っているのか教えてもらえますか? 機能していません。入力された sn という名前の値を var pass と比較できるようにする必要があります。
私は初心者であり、ネイティブ スピーカーではないので、落ち着いてください:)