Entries Tagged ‘jquery’:

基于jquery的漂亮内容滚动展示

Website: http://webdeveloperplus.com/jquery/featured-content-…
Demo: http://demo.webdeveloperplus.com/featured-content-sl…

Tags: , , ,

Leave a Comment

jquery实现ajax跨域请求访问

jquery1.2以后可以通过getJSON来实现ajax跨域请求访问了。
具体方法:
非跨域的方式:
客户端

$.getJSON(’test.php’,null,function (json){
alert(json.a);
});

服务端:

require(’JSON.php’);
$json = new Services_JSON();
$info = array(’a'=>1);
 
echo .$json->encode($info);
//实际输出 {"a":1}

跨域的方式:
客户端

$.getJSON(’http://slow-live.com/test.php?jsoncallback=?’,function (json){//区别在于增加jsoncallback传递回访函数?代表由jquery来指定
alert(json.a);
});

服务端:

require(’JSON.php’);
$json = new Services_JSON();
$info = array(’a'=>1);
 
echo $_REQUEST[’jsoncallback’].’(’.$json->encode($info).’)';
//服务端的区别不是直接输出数据,把回访函数加上
//实际输出 jsonp1237114865030({"a":1})

实际上跨域是通过动态增加script来加载数据,无法直接获得数据,所以需要使用回调函数。
可以参考另一篇:http://www.coderhome.net/zifa/archives/139

Tags: ,

Comments (3)

Jquery1.2.6源码分析

能够用厚厚的PDF来解释jQuery的人不多,但确实是有一个。看到这篇文章也是一个意外,是从订阅的某个人的博客里找到的。他看到这篇文章也很意外,于是乎,我也就很意外的转载了一下。
原文地址:http://jljlpch.javaeye.com/blog/234218
作者:jljlpch
原文中的PDF下载地址:

Jquery1.2.6源码分析.rar (660.9 KB)
描述: Jquery1.2.6源码分析及源码文件
下载次数: 355

镜象PDF下载:jquery1.2.6源码分析.rar

Tags:

Comments (2)

jquery无刷新删除数据

http://coderhome.net/code/index.php?mode=entry&id=148

Tags:

Comments (1)