如何使用JQuery进行客户端验证? [英] How to do clientside validation using JQuery?

查看:64
本文介绍了如何使用JQuery进行客户端验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用JQuery在客户端进行验证?

How to do validation on client-side using JQuery?

Thanks in advance!

推荐答案

请使用jQuery的验证插件来做到这一点: ^ ].
这就是进行客户端验证的方法.

希望对您有帮助.

干杯!
Please use the Validation plugin for jQuery to do that: http://docs.jquery.com/Plugins/validation[^].
That''s the way to do clientside validation.

Hope that helps you.

Cheers!


如果您是初学者,请参考此站点:

http://www.dotnetcurry.com/ShowArticle.aspx?ID=231 [ ^ ]

从那里添加示例:

示例1 –使用jQuery在asp:Button单击上显示警报
将Button元素添加到页面,如下所示:
As you are a beginner,please refer this site:

http://www.dotnetcurry.com/ShowArticle.aspx?ID=231[^]

Adding an example from there:

Example 1 – Display an alert on asp:Button click using jQuery
Add a Button element to the page as shown below:
<asp:button id="Button1" runat="server" text="Button" xmlns:asp="#unknown" />

现在为了告诉浏览器在准备好或加载文档后立即使用jQuery执行某些操作,请使用以下代码块:

Now in order to tell the browser to perform some action using jQuery as soon as the document is ready or loaded, use this block:

<script type="text/javascript">


(document).ready(function() { // add code here }); </script>
(document).ready(function() { // add code here }); </script>

在功能块中添加代码

Add your code in the function block

<script type="text/javascript">


这篇关于如何使用JQuery进行客户端验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆