明天的明天 永远的永远 未知的一切 我与你一起承担 ??

是非成败转头空 青山依旧在 几度夕阳红 。。。
随笔 - 1277, 文章 - 0, 评论 - 214, 阅读 - 320万
  博客园  :: 首页  :: 管理
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  jQuery

摘要:Jquery的$.ajax方法可以实现ajax调用,要设置url,post,参数等。如果要提交现有Form需要写很多代码,何不直接将Form的提交直接转移到ajax中呢。以前的处理方法如Form代码如下:<formid="Form1" action="action.aspx" method="post" >名称:<inputname="name" type="text" /><br/>密码:<inputname="password" 阅读全文

posted @ 2012-06-15 17:59 且行且思 阅读(1406) 评论(0) 推荐(0) 编辑

摘要:源码:http://files.cnblogs.com/Fooo/jquery.combogrid-1.5.0.rar效果:下载的源程序中示例为php, 个人结合json规范修改成.net示例,如JsonData.ashx :<%@ WebHandler Language="C#" Class="JsonData" %>using System;using System.Web;/* * 异步获取查询字符,并生成combogrid下拉表单数据。 * 必须返回json格式数据 -多属性及多数据行"; * 创建日期:Lt 2012-02 阅读全文

posted @ 2012-02-27 17:10 且行且思 阅读(1134) 评论(0) 推荐(0) 编辑

摘要:Jquery已封装JS的setTimeout 和 setInterval 方法,下面看下应用例子:JS Code [http://www.xueit.com]$("#close-button").click(function() {$(this).oneTime(1000, function() { $(this).parent(".main-window").hide();});});$("#cancel-button").click(function() {$("#close-button").stopTime 阅读全文

posted @ 2011-12-15 17:33 且行且思 阅读(56920) 评论(0) 推荐(0) 编辑

摘要:HTML页面代码<a href="javascript.:void(0)" id="ok"> 确定</a>javascript代码$("#ok").click( function(){ ..... $("#QueryForm").submit(); //$("form").eq(0).submit();//$("#QueryForm").submit();//$("form[0]").submit(); return false; 阅读全文

posted @ 2011-12-08 12:07 且行且思 阅读(1254) 评论(0) 推荐(0) 编辑

摘要:$("form").attr("check"); $("form").prop("check"); 两种都可以,不过新版jquery推荐第二种,两个在其他方面都差不多,我发现的唯一不同就是在checkbox上的时候,需要用prop,不然IE浏览器会不兼容//=====================================================================================<html xmlns="http://www.w3.org/1999/xh 阅读全文

posted @ 2011-10-13 00:30 且行且思 阅读(116208) 评论(2) 推荐(4) 编辑

摘要:js闭包(转载)一、什么是闭包? “官方”的解释是:闭包是一个拥有许多变量和绑定了这些变量的环境的表达式(通常是一个函数),因而这些变量也是该表达式的一部分。 相信很少有人能直接看懂这句话,因为他描述的太学术。其实这句话通俗的来说就是:JavaScript中所有的function都是一个闭包。不过一般来说,嵌套的function所产生的闭包更为强大,也是大部分时候我们所谓的“闭包”。看下面这段代码: function a() { var i = 0; function b() { alert(++i); } return b; } var c = a(); c(); 这段代码有两个特... 阅读全文

posted @ 2011-10-11 11:45 且行且思 阅读(2377) 评论(0) 推荐(0) 编辑

摘要:JQuery.Ajax之错误调试帮助信息2011-09-01 09:39下面是Jquery中AJAX参数详细列表:参数名类型描述url String(默认: 当前页地址) 发送请求的地址。typeString(默认: "GET") 请求方式 ("POST" 或 "GET"), 默认为 "GET"。注意:其它 HTTP 请求方法,如 PUT 和 DELETE 也可以使用,但仅部分浏览器支持。timeoutNumber设置请求超时时间(毫秒)。此设置将覆盖全局设置。async Boolean(默认: true) 默认设 阅读全文

posted @ 2011-09-05 21:58 且行且思 阅读(548) 评论(1) 推荐(0) 编辑

摘要:利用JQuery的$.ajax()可以很方便的调用asp.net的后台方法。先来个简单的实例热热身吧。1、无参数的方法调用asp.net code:view plaincopy to clipboardprint?using System.Web.Script.Services; [WebMethod] public static string SayHello() { return "Hello Ajax!"; } using System.Web.Script.Services;[WebMethod]public static string SayHello(){ re 阅读全文

posted @ 2011-08-16 16:00 且行且思 阅读(1082) 评论(0) 推荐(1) 编辑

摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><style t 阅读全文

posted @ 2011-06-15 10:15 且行且思 阅读(651) 评论(0) 推荐(0) 编辑

摘要://DataTable转成Json public static string DataTableToJson(string jsonName, DataTable dt) { StringBuilder Json = new StringBuilder(); Json.Append("{\"" + jsonName + "\":["); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { Json.Append("{"); 阅读全文

posted @ 2011-03-23 00:47 且行且思 阅读(1956) 评论(0) 推荐(3) 编辑

摘要:1、 内容里有两个ifame <iframe id="leftiframe"...</iframe> <iframe id="mainiframe..</iframe> leftiframe中jQuery改变mainiframe的src代码: $("#mainframe",parent.document.body).attr("src","http://www.radys.cn") 2、 如果内容里面有一个ID为mainiframe的ifame <iframe i 阅读全文

posted @ 2011-02-25 11:45 且行且思 阅读(1926) 评论(0) 推荐(0) 编辑

摘要:jQuery.each方法用于遍历一个数组或对象,并对当前遍历的元素进行处理,在jQuery使用的频率非常大,下面就这个函数做了详细讲解:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--/*!*jQuery源码分析-each函数*jQuery版本:1.4.2**----------------------------------------------------------*函数介绍**each函数通过jQuery.extend函数附加到jQ 阅读全文

posted @ 2011-01-11 14:51 且行且思 阅读(9109) 评论(1) 推荐(5) 编辑

摘要:timeCountDown.js 对象插件:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--/*byzhangxinxu2010-07-27*http://www.zhangxinxu.com/*倒计时的实现*/varfnTimeCountDown... 阅读全文

posted @ 2010-09-26 11:12 且行且思 阅读(911) 评论(0) 推荐(0) 编辑

摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-... 阅读全文

posted @ 2010-09-26 10:06 且行且思 阅读(786) 评论(0) 推荐(0) 编辑

摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-... 阅读全文

posted @ 2010-04-12 00:53 且行且思 阅读(3763) 评论(0) 推荐(0) 编辑

摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--Attribute:$(”p”).addClass(css中定义的样式类型);给某个元素添加样式$(”img”).attr({src:”t... 阅读全文

posted @ 2010-02-01 16:45 且行且思 阅读(26791) 评论(3) 推荐(14) 编辑

摘要:Aptana Studio 是一个集成式的Web应用程序开发环境,它不仅可以作为独立的程序运行,而且还可以作为Eclipse插件使用。所以,如果您已经安装了Eclipse的话,就可以将Aptana作为插件直接安装到您的Eclipse环境中。而本文将为读者详细介绍在Eclipse中安装Aptana Studio的详细过程。  一、Aptana Studio简介  Aptana Studio 是一个基... 阅读全文

posted @ 2010-01-27 16:47 且行且思 阅读(2559) 评论(0) 推荐(0) 编辑

摘要:json包括两种数据结构,一种类似于哈希表,另外一种类似于数组。 简单的说,就是用xml传输数据的一个替代方案,传的字节数更少,传输的过程实质上是用{}或者[]包裹的字符串,在代码短解释对象。{}对应于object,[]对应于array,在代码端同样可以做反向操作。现在很多基于ajax的应用都是在服务器端获取数据,然后生成json,传到客户端,然后在客户端渲染界面。。 再简单点,就是一种特定格式的... 阅读全文

posted @ 2009-12-28 11:36 且行且思 阅读(4495) 评论(0) 推荐(0) 编辑

摘要:Html:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<inputid="Keyword"type="text"name="Keyword"class="input"style="width:141px;"onkeypress="if(e... 阅读全文

posted @ 2009-12-23 16:12 且行且思 阅读(2100) 评论(0) 推荐(0) 编辑

摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--$.ajax({async:true,//默认true(异步请求)cache:true,//默认true,设置为false将不会从浏览器缓存中加载请求信息。type:"POST",//默认:GET请求... 阅读全文

posted @ 2009-12-02 09:32 且行且思 阅读(4458) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示