外头站着
26
9 月

在Blog上显示QQ签名 – (庙)是一天建成的

$.ajax({
		type: "GET",
		url: 'http://taotao.qq.com/v1/qz_first/firstjson?uin=18958069',
		success: callback,
		dataType: 'script',
		scriptCharset:'GB2312'
	});
var callback = function(json) {
	if (json && typeof json === 'object') {
		var title = json.items[0].title || '';
		$('#taotao').text(title);
	}
}

如果你页面是 UTF-8 的一定要加

scriptCharset:'GB2312'

否则在IE下会乱码
jQuery 的写法很清楚,我就不再切正题了…

正题切完了, 继续分享一个小技巧:
http://code.google.com/apis/ajaxlibs/documentation/
如果要把粗大的 jQuery 交给有 CDN 的 google 托管可以看看

google.load(“jquery”,”1.3.2″); //就会加载1.3.2的 jQuery 库

google.load(“jquery”,”1″); //这个会加载1.x里面最新的 jQuery ,就是说升级到了 1.5 什么的也不用管,自己会调用新的

同理于
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
和
http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js

yeah, bigCat made it!

» You can leave a comment, or trackback from your own site.

大战 51 回合 to “在Blog上显示QQ签名 – (庙)是一天建成的”

  1. Louis Han说道:

    拜读 研究一蛤

  2. Lxhome说道:

    好酷的主题啊!!牛X啊

  3. 小马同志说道:

    大猫,貌似不能回复id为中文的留言。

  4. […] 大猫曾写过 在Blog上显示QQ签名 – (庙)是一天建成的 […]

  5. QQ签名说道:

    😆 😆 😆 我想在某张图上面随时更新用户个性签名 又可以水印 不知道博主 您知道 这个怎么弄
    吗?

Leave a Reply

:!: :roll: :o :lol: :P :( 8O :x :oops: :) :?: :idea: :evil: ;) :twisted: