📜  java 脚本表单 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:57.684000             🧑  作者: Mango

代码示例1
function validateForm() {
  let x = document.forms["myForm"]["fname"].value;
  if (x == "") {
    alert("Name must be filled out");
    return false;
  }
}