随笔分类 -  Ajax

摘要:<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="CnNorco2010.WebForm1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org... 阅读全文
posted @ 2010-06-30 18:45 tangself 阅读(624) 评论(0) 推荐(1)
摘要:代码样例:<a href="http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d";target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime=... 阅读全文
posted @ 2010-06-29 11:04 tangself 阅读(5012) 评论(0) 推荐(1)
摘要:function createAjaxObj(){var httprequest=falseif (window.XMLHttpRequest){ // if Mozilla, Safari etchttprequest=new XMLHttpRequest()if (httprequest.overrideMimeType)httprequest.overrideMimeType('text/x... 阅读全文
posted @ 2010-05-28 15:49 tangself 阅读(554) 评论(0) 推荐(0)
摘要:<style>ul{width:60px}li{margin:0px;padding:0px;list-style:none;display:inline;width:30px}</style><ul id="test"><li>1</li><li>2</li><li>3</li><l... 阅读全文
posted @ 2010-05-22 12:07 tangself 阅读(386) 评论(0) 推荐(0)
摘要:jQuery获取Radio选择的Value值:1. $("input[name='radio_name'][checked]").val();//选择被选中Radio的Value值2. $("#text_id").focus(function(){//code...});//事件 当对象text_id获取焦点时触发3. $("#text_id").blur(function(){//code...... 阅读全文
posted @ 2010-04-14 11:38 tangself 阅读(77446) 评论(5) 推荐(6)
摘要:jQuery中对键盘事件进行了修正调用函数的时候传入事件即可。通过事件的which可以找到键码不过当有组合键的时候还需要注意一下如ctrl+enter键,虽然都是用e.ctrlKey但是 enter键的键码不是始终为13了在ff中 判断 ctrl+enter 是 e.ctrlKey && e.which ==13在ie6中 判断ctrl+enter 是 e.ctrlKey &... 阅读全文
posted @ 2010-04-09 18:03 tangself 阅读(363) 评论(0) 推荐(0)
摘要:+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++accordion类+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++基于jQuery开发,非常简单的水平方向折叠控件。Horizontal acco... 阅读全文
posted @ 2010-04-09 17:12 tangself 阅读(521) 评论(0) 推荐(0)
摘要:1、关于页面元素的引用通过jquery的$()引用元素包括通过id、class、元素名以及元素的层级关系及dom或者xpath条件等方法,且返回的对象为jquery对象(集合对象),不能直接调用dom定义的方法。2、jQuery对象与dom对象的转换只有jquery对象才能使用jquery定义的方法。注意dom对象和jquery对象是有区别的,调用方法时要注意操作的是dom对象还是jquery对象... 阅读全文
posted @ 2010-04-08 16:18 tangself 阅读(264) 评论(0) 推荐(0)
摘要:很多页面中都会用到tab选项卡切换,下面这个巧妙的运用css设置边框,来使得激活的tab与其他未激活的边框有所不同。就是将激活的边框的border-bottom设置为与激活tab的背景色一致,这样就看起来下面是没有边框的。然后用jquery实现tab的切换,首先载入页面时就去掉所有的active样式,去掉所有的content内容,然后给第一个tab加上active样式,显示第一个content。然... 阅读全文
posted @ 2010-03-01 17:33 tangself 阅读(1248) 评论(0) 推荐(0)
摘要:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="... 阅读全文
posted @ 2010-03-01 17:23 tangself 阅读(212) 评论(0) 推荐(0)
摘要:<div id="demo"></div>省/直辖市:<select style="width: 100px" id="op1" onchange="OpSelectChange(this)" name="op1"></select> 市:<select style="width: 100px" id="op2" onchange="OpSel... 阅读全文
posted @ 2010-01-17 07:43 tangself 阅读(461) 评论(0) 推荐(0)
摘要:<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD... 阅读全文
posted @ 2010-01-16 14:32 tangself 阅读(243) 评论(0) 推荐(0)
摘要:功能说明:当用户在注册页面输入用户名并且鼠标焦点离开输入框时,到数据表中去验证该用户名是否已经存在,如果存在提示【不可用】,否则,提示【可用】。 必备知识:HTML、JavaScript、C#、ADO.NET,另外就是如何创建AJAX请求对象、使用open()和send()方法以及readyState、status、onreadystatechange、responseText的含义和用法。 本例... 阅读全文
posted @ 2009-12-14 21:58 tangself 阅读(277) 评论(0) 推荐(0)
摘要:<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Search.ascx.cs" Inherits="UserControls_Search" %><style> #search_suggest { position:absolute; background:#FFFFFF; text-align:left... 阅读全文
posted @ 2009-12-02 14:55 tangself 阅读(295) 评论(0) 推荐(0)