【ASP.NETjQuery实例2(表单中使用回车在TextBox之间向下移动)_jquery】教程文章相关的互联网学习教程文章

ASP.NETjQuery实例12通过使用jQueryvalidation插件简单实现用户注册页面验证功能_jquery【图】

页面样式代码: 代码如下: .header { background-color: #CCCCCC; color: White; font-size: x-large; } .content { background-color: White; font-weight: lighter; font-size: small; } .content td { text-align: left; } .mandatory { color: Red; } .errorContainer { display: none; margin-bottom: 20px; } .alertMsg { margin-left: 20px; color: #660000; } .input-highlight { background-color: #CCCCCC; } 页面结...

ASP.NETjQuery实例17通过使用jQueryvalidation插件校验ListBox_jquery【图】

这里我们举例校验ListBox两个规则: 校验必选项 选择范围在0~4项 界面代码: 代码如下: 脚本代码: 代码如下: Recipe17 $(function () { $("#form1").validate({ rules: { lstCar: { required: true, rangelength: [0, 4] } }, messages: { lstCar: { required: "至少选择一种车!", rangelength: "选择的范围为零到四种车!" } }, errorLabelContainer: $("#message") }); }); .alertmsg { color: #FF0000; } 界面效...

三种动态加载js的jquery实例代码另附去除js方法_javascript技巧【图】

代码如下: !-- 这里为你提供了三种动态加载js的jquery实例代码哦,由于jquery是为用户提供方便的,所以利用jquery动态加载文件只要一句话$.getscript("test.js");就ok了。 jquery 动态加载js三种方法 $.getscript("test.js"); //方法二 function loadjs(file){ var head = $('head').remove('#loadscript'); $(""+"").attr({src:file,type:'text/javascript',id:'load'}).appendto(head); } //够简单把!如果在浓缩以下你甚至...

jQuery实例—选项卡的简单实现(js源码和jQuery)【图】

分别利用javascript的源码和jQuery来实现一个简单的选项卡,对比各自的步骤。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery实例—选项卡的简单实现(js源码和jQuery) </title> <style> div{display:non...

jQuery的实例及必知重要的jQuery选择器详解

Jquery能做什么 访问和操作DOM元素 控制页面样式 对页面事件进行处理 扩展新的jQuery插件 与Ajax技术完美结合Jquery的优势 体积小,压缩后只有100KB左右 l强大的选择器 出色的DOM封装 l可靠的事件处理机制 出色的浏览器兼容性 使用隐式迭代简化编程 丰富的插件支持 jQuery的知识的分解: 1.关于window.onload和$(function(){})区别 解析:window.onload等待页面上所有资源(html标签,css,img,js)都加...

三种动态加载js的jquery实例代码另附去除js方法

代码如下:!-- 这里为你提供了三种动态加载js的jquery实例代码哦,由于jquery是为用户提供方便的,所以利用jquery动态加载文件只要一句话$.getscript("test.js");就ok了。 <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=gb2312" ...

ASP.NET jQuery 实例7 通过jQuery来获取DropDownList的Text/Value属性值【图】

界面代码: 代码如下:<form id="form1" runat="server"> <div align="center"> <fieldset style="width: 400px; height: 80px;"> <p> 选择颜色:</p> <asp:DropDownList ID="ddlColor" runat="server"> <asp:ListItem Text="--- 请选择 ---" Value=""></asp:ListItem> <asp:ListItem Text="红色" Value="1"></asp:ListItem> <asp:ListItem Text="黄色" Value="2"></asp:ListItem> <asp:ListItem Text="蓝色" Value="3"></asp:List...

ASP.NET jQuery 实例8 (动态添加内容到DropDownList)【图】

首先准备好页面代码: 代码如下:<form id="form1" runat="server"> <div align="left"> <fieldset style="width: 350px; height: 150px"> <p> 选择颜色</p> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> </td> <td> <asp:DropDownList ID="ddlFirst" runat="server"> <asp:ListItem Value="" Text="--- 请选择 ---"></asp:ListItem> <asp:ListItem Value="1" Text="红色"></asp:ListItem> <asp:ListItem Valu...

ASP.NET jQuery 实例9 通过控件hyperlink实现返回顶部效果

要实现该效果,首先要先了解以下几点基础知识: 窗体滚动事件:$(window).scroll(function(){...}); 获取窗体滚动距离:$(window).scrollTop(); 获取窗体高度:$(window).height(); 了解以上内容就可以实现通过hyperlink控件实现返回顶部的效果了。 1.准备界面结构代码: 代码如下:<form id="form1" runat="server"> <div> <asp:HyperLink ID="Top" runat="server"></asp:HyperLink> <h1 style="text-align: center"> 利用jQuery实...

ASP.NET jQuery 实例10 动态修改hyperlink的URL值【图】

1.先准备界面代码: 代码如下:<form id="form1" runat="server"> <div align="left"> <fieldset style="width: 300px; height: 200px;"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td style="width: 10px"> </td> <td> <p> 更新网址:</p> <asp:RadioButtonList ID="rblUrl" runat="server"> <asp:ListItem Text="新浪" Value="http://www.sina.com.cn"></asp:ListItem> <asp:ListItem Text="百度" Value="http:/...

ASP.NET jQuery 实例11 通过使用jQuery validation插件简单实现用户登录页面验证功能【图】

简单来说,jQuery validation插件就是来校验表单form里面元素输入的内容是否满足业务规则,如果不满足,可以给出用户自定义的提示信息。该插件不仅默认有一些校验规则,如校验内容是否为空,内容的长度是否符合给定的值,还可以根据用户自定义业务规则,而且错误提示信息,也可以根据用户的要求自定义显示。看来这个插件的功能确实很强大,是不是迫不及待想使用了。好的,那我们就开始简介如何使用它。 jQuery validation 插件下载...

ASP.NET jQuery 实例12 通过使用jQuery validation插件简单实现用户注册页面验证功能

页面样式代码: 代码如下:<style type="text/css"> .header { background-color: #CCCCCC; color: White; font-size: x-large; } .content { background-color: White; font-weight: lighter; font-size: small; } .content td { text-align: left; } .mandatory { color: Red; } .errorContainer { display: none; margin-bottom: 20px; } .alertMsg { margin-left: 20px; color: #660000; } .input-highlight { background-colo...

ASP.NET jQuery 实例13 原创jQuery文本框字符限制插件-TextArea Counter【图】

可限制最大输入字符长度 可设置字符截取速度 可自定义提示信息文本样式(可以改进自定义文本内容) 该插件统计英文字符和中文的长度是一样的。 废话少说,这里直接奉上详细插件代码,具体实现细节已经在代码里面有注释: 代码如下:; (function ($) { $.fn.extend({ textAreaCount: function (options) { var $textArea = this; options = $.extend({ maxlength: 140, // 定义一个最大输入长度变量,初始化为500 speed: 15, // 定义删...

ASP.NET jQuery 实例14 在ASP.NET form中校验时间范围【图】

下载地址:http://jqueryui.com/download,Theme选择Sunny 界面代码: 代码如下:<form id="form1" runat="server"> <div align="center"> <fieldset style="width: 400px; height: 150px"> <table border="0" cellpadding="3" cellspacing="3"> <tr> <td colspan="2"> 请输入日期范围: </td> </tr> <tr> <td> 开始时间: </td> <td> <asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox> </td> </tr> <tr> <td> 结束时...

ASP.NET jQuery 实例15 通过控件CustomValidator验证CheckBoxList【图】

首先看下界面代码: 代码如下:<form id="form1" runat="server"> <div align="center"> <fieldset style="width: 350px; height: 200px;"> <table border="0" cellpadding="3" cellspacing="3"> <tr> <td> 请选择汽车类型: </td> </tr> <tr> <td> <asp:CheckBoxList ID="chkCar" runat="server"> <asp:ListItem Value="1" Text="奔驰汽车"></asp:ListItem> <asp:ListItem Value="2" Text="宝马汽车"></asp:ListItem> <asp:ListIt...

TEXTBOX - 相关标签