<strong>1 包含jquery</strong> <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="7525" class="copybut" id="copybut7525" onclick="doCopy('code7525')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code7525"> <br><script src="images/jquery-1.2.6.min.js" type="text/javascript"></script> <br><script src="images/jquery.form.js" type="text/javascript"></script> <br> </div> <br><strong>2 设置 <br></strong><div id="msg"></div> <br><br><strong>3 JAVASCRIPT设置</strong> <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="99239" class="copybut" id="copybut99239" onclick="doCopy('code99239')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code99239"> <br><script type="text/javascript"> <BR><!-- <BR>$(function(){ <BR>$('#msg').hide(); <BR>var options = { <BR>target: '#msg', <BR>url: 'XXXX.ACTION', <BR>beforeSubmit: function(){ <br><br>if($('#company').val()==''){ <BR>$('#msg').html("<span class=\"about_content_title\">[公司名称]不能为空!"); <BR>$('#msg').show(1000); <BR>$('#msg').hide(3000); <BR>return false; <BR>} <br><br>$('#msg').html("<img src=\"images/loading.gif\" / alt="jquery中输入验证中一个不错的效果_jquery" ><span class=\"about_content_title\"> 资料保存中,请稍候。。。"); <BR>$('#msg').show(1000); <BR>} <BR>success: function() { <BR>$('#msg').html("<span class=\"about_content_title\">资料保存成功!"); <BR>$('#msg').show(1000); <BR>$('#myform').resetForm(); <BR>$('#msg').hide(3000); <BR>} <BR>}; <BR>$('#myform').ajaxForm(options); <BR>}); <BR>--> <BR></script> <br> </div>