php-JS判断文本框是否是空的问题,为什么我的代码不能判断,就指点
程序员文章站
2022-04-20 15:07:09
...
phphtmljavascrpit
实验报告提交系统
h2, font { font-style: oblique; color: #FCC898; font-weight: normal id=top; valign =top; position: relative;}function YanZheng() { var cname = document.getElementById("cname").value; var tname = document.getElementById("tname").value; var ppro = document.getElementById("ppro").value; var pgrade = document.getElementById("pgrade").value; var pcol = document.getElementById("pcol").value; //var pcutdate = document.getElementById("pcutdate").value; var pname = document.getElementById("pname").value; var paim = document.form1.paim.value; var pcontent = document.getElementById("pcontent").value; var pstep = document.getElementById("pstep").value; var panalyse = document.getElementById("panalyse").value; var presult = document.getElementById(" presult").value; //这个功能没实现 if (cname=="") { window.alert("请输入所有内容"); return false; } } function Reset() { document.getElementById("cname").value = ""; document.getElementById("tname").value = 0; document.getElementById("ppro").value = 0; document.getElementById("pgrade").value = 0; document.getElementById("pcol").value = 0; document.getElementById("pcutdate").value = ""; document.getElementById("pname").value = ""; document.getElementById("paim").value = ""; document.getElementById("pcontent").value = ""; document.getElementById("pstep").value = ""; document.getElementById("panalyse").value = ""; document.getElementById("presult").value = ""; } function YYYYMMDDstart() { MonHead = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; //先给年下拉框赋内容 var y = new Date().getFullYear(); for (var i = (y-30); i =1&&i
onsubmit="return YanZheng();">
$conn = mysql_connect ( 'localhost', 'root', 'admin' ) or die ( 'could not connect: ' . mysql_error () );
mysql_select_db ( 'sybgtjxt' ) or die ( 'could not select database' );
mysql_query ( "set names gbk" );
?>
实验报告提交系统
h2, font { font-style: oblique; color: #FCC898; font-weight: normal id=top; valign =top; position: relative;}function YanZheng() { var cname = document.getElementById("cname").value; var tname = document.getElementById("tname").value; var ppro = document.getElementById("ppro").value; var pgrade = document.getElementById("pgrade").value; var pcol = document.getElementById("pcol").value; //var pcutdate = document.getElementById("pcutdate").value; var pname = document.getElementById("pname").value; var paim = document.form1.paim.value; var pcontent = document.getElementById("pcontent").value; var pstep = document.getElementById("pstep").value; var panalyse = document.getElementById("panalyse").value; var presult = document.getElementById(" presult").value; //这个功能没实现 if (cname=="") { window.alert("请输入所有内容"); return false; } } function Reset() { document.getElementById("cname").value = ""; document.getElementById("tname").value = 0; document.getElementById("ppro").value = 0; document.getElementById("pgrade").value = 0; document.getElementById("pcol").value = 0; document.getElementById("pcutdate").value = ""; document.getElementById("pname").value = ""; document.getElementById("paim").value = ""; document.getElementById("pcontent").value = ""; document.getElementById("pstep").value = ""; document.getElementById("panalyse").value = ""; document.getElementById("presult").value = ""; } function YYYYMMDDstart() { MonHead = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; //先给年下拉框赋内容 var y = new Date().getFullYear(); for (var i = (y-30); i =1&&i
onsubmit="return YanZheng();">
课程名称: | |
---|---|
任课老师: |
下一篇: 详解HTML5 录音遇到的坑