主题: 验证空值后还能提交什么原因啊 |
作者: yuchen8611, 发布日期: 2013-05-22 20:23:29, 浏览数: 2193 |
<script charset="utf-8" src="../editor/kindeditor-min.js"></script> <script charset="utf-8" src="../editor/lang/zh_CN.js"></script> <script> var editor; KindEditor.ready(function(K) { editor = K.create('textarea[name="content"]', { resizeType : 1, allowPreviewEmoticons : false, allowImageUpload : false, items : [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist'], afterBlur: function(){this.sync();} }); }); function chksub(theForm) { if(form.title.value=='') { alert("请添加标题"); form.title.focus(); return false; } if(form.content.value=='' ) { alert("请添加内容"); form.content.focus(); return false; } } </script> <form action="" method="post" name=form> <tr> <td width=80>标题</td> <td> <input type="text" name="title" size=50 value="<?php echo $_GET[bt];?>"> <select> </td> </tr> <tr> <td width=80>作者</td> <td> <input type="text" name="author" size=20 value="<?php echo $db->getcon("p_admin",'name');?>" > </td> </tr> <tr> <td width=80>内容</td> <td> <textarea name="content" id="content" style="width:700px;height:200px;visibility:hidden;"></textarea> </td> </tr> <tr> <td width=80></td> <td> <input type="submit" onclick="return chksub(this);" name="into_news" style="height:30px;" value="添加"> </td> </tr> </form> kineditor 验证空值后,还能提交 什么原因啊 那里有问题啊 |