php判断表单是否为空的js怎么不管用呢? <form action="res.php" method="post" name="myform" onbsumit="return checkdata();"> //onsubmit 拼写有误 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><meta name="author" content=""></head><script language="javascript">function checkdata(){first=document.myform.txt_fname.value;if(first==null || first==''){alert("is null!");return false;}elsedocument.myform.submit();}</script><body><form action="res.php" method="post" name="myform"><table align="center" width="500px" border="1"><tr><td>first</td><td><input type="text" name="txt_fname"></td></tr><tr><td>last</td><td><input type="text" name="txt_lname"></td></tr><tr><td>position</td><td><input type="text" name="txt_position"></td></tr><tr><td>address</td><td><textarea rows="4" name="txt_address"></textarea><tr><td colspan="2" align="center"><input type="button" value="query" onclick="checkdata()"> <input type="reset"></td></tr></table></form></body></html> onbsumit="return checkdata();">onsubmit 呵呵,路过,学习一下,正在研究php和js之间的变量传值呢。 用php语言编写的网页能在ipad上通过safari浏览吗 为什么我的php向mysql一次插入两条相同的数据 有关mysql_fetch_object($sql)的数组问题 删除cookie的问题 PHP 分页类掉用问题 北京寻兼职美工,要求会些网页制作有一定的编程基础 如何获取PHP的HTTP包头中的用户自定义部分? PHP获取自身实例的意义 php 调用其他机器目录的文件,请高手赐教! 循环求助~关于循环对比问题 提问,关于session的问题(作用域?过期时间?) APACHE+php6安装的安装方法.
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="author" content="">
</head>
<script language="javascript">
function checkdata()
{
first=document.myform.txt_fname.value;
if(first==null || first=='')
{
alert("is null!");
return false;
}
else
document.myform.submit();
}
</script><body>
<form action="res.php" method="post" name="myform">
<table align="center" width="500px" border="1">
<tr><td>first</td><td><input type="text" name="txt_fname"></td></tr>
<tr><td>last</td><td><input type="text" name="txt_lname"></td></tr>
<tr><td>position</td><td><input type="text" name="txt_position"></td></tr>
<tr><td>address</td><td><textarea rows="4" name="txt_address"></textarea>
<tr><td colspan="2" align="center">
<input type="button" value="query" onclick="checkdata()">
<input type="reset">
</td></tr>
</table>
</form>
</body>
</html>
onsubmit