jquery中输入验证中一个不错的效果
1 包含jquery
2 设置
<div id="msg"></div></td>
3 JAVASCRIPT设置
代码如下:
<script src="images/jquery-1.2.6.min.js" type="text/javascript"></script> <script src="images/jquery.form.js" type="text/javascript"></script>
2 设置
<div id="msg"></div></td>
3 JAVASCRIPT设置
代码如下:
<script type="text/javascript"> <!-- $(function(){ $('#msg').hide(); var options = { target: '#msg', url: 'XXXX.ACTION', beforeSubmit: function(){ if($('#company').val()==''){ $('#msg').html("<span class=\"about_content_title\">[公司名称]不能为空!</span>"); $('#msg').show(1000); $('#msg').hide(3000); return false; } $('#msg').html("<img src=\"images/loading.gif\" /><span class=\"about_content_title\"> 资料保存中,请稍候。。。</span>"); $('#msg').show(1000); } success: function() { $('#msg').html("<span class=\"about_content_title\">资料保存成功!</span>"); $('#msg').show(1000); $('#myform').resetForm(); $('#msg').hide(3000); } }; $('#myform').ajaxForm(options); }); --> </script>
相关推荐
EdwardSiCong 2020-11-23
85477104 2020-11-17
hhanbj 2020-11-17
81427005 2020-11-11
seoppt 2020-09-13
honeyth 2020-09-13
WRITEFORSHARE 2020-09-13
84483065 2020-09-11
momode 2020-09-11
85477104 2020-08-15
83510998 2020-08-08
82550495 2020-08-03
tthappyer 2020-08-03
84901334 2020-07-28
tthappyer 2020-07-25
TONIYH 2020-07-22
tztzyzyz 2020-07-20
83510998 2020-07-18
81463166 2020-07-17