国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

App下載
首頁javascriptformJavascript Form - 如何請在提交表單之前檢查文本輸入字段框值

Javascript Form - 如何請在提交表單之前檢查文本輸入字段框值

我們想知道如何請在提交表單之前檢查文本輸入字段框值。

 
<HTML>
<HEAD>
<SCRIPT>
function checkLawyer(str) {  
   if ((str.toUpperCase() == "LAWYER") || (str.toUpperCase() == "ATTORNEY"))
      console.log ("Lawyers are not wanted here...");
   else
      console.log("Your application will be evaluated!");
}
</SCRIPT>
</HEAD>
<BODY>
<FORM name="theForm">
Enter Your Profession:
<INPUT type=text name="userProf">
<INPUT type=button 
       name="theButton" 
       value="SUBMIT QUERY" 
       onClick="checkLawyer(window.document.theForm.userProf.value)";>
</FORM>  
</BODY>
</HTML>