<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>张经纬的博客</title>
	<atom:link href="http://www.zhangjingwei.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zhangjingwei.com</link>
	<description></description>
	<lastBuildDate>Sun, 13 May 2012 16:18:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>利用phantomjs实现网页截图</title>
		<link>http://www.zhangjingwei.com/archives/phantomjs/</link>
		<comments>http://www.zhangjingwei.com/archives/phantomjs/#comments</comments>
		<pubDate>Sun, 13 May 2012 15:44:35 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[开发工具]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1806</guid>
		<description><![CDATA[phantomjs 是一个基于webkit内核的javascript api，目前是是1.5版本。 phantomjs 的应用场景主要有： 1、自动化测试 2、网站抓取（Site scraping） 3、网页截屏（Page rendering） 4、网络监控（Network monitoring） phantomjs 最大的特点就是跨平台，目前可以在linux\mac\windows上使用。：） 我测试了一下phantomjs的网页截屏范例，代码如下： var page = require&#40;'webpage'&#41;.create&#40;&#41;, address, output, size; &#160; if &#40;phantom.args.length &#60; 2 &#124;&#124; phantom.args.length &#62; 3&#41; &#123; console.log&#40;'Usage: rasterize.js URL filename'&#41;; phantom.exit&#40;&#41;; &#125; else &#123; address = phantom.args&#91;0&#93;; output = phantom.args&#91;1&#93;; page.viewportSize = &#123; width: 1024, height: 768 &#125;; page.open&#40;address, [...]]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/phantomjs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Double Dateinput (双日历选择插件)</title>
		<link>http://www.zhangjingwei.com/archives/jquery-double-dateinput/</link>
		<comments>http://www.zhangjingwei.com/archives/jquery-double-dateinput/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 07:05:01 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1788</guid>
		<description><![CDATA[ul.ddinput { margin-bottom:15px;} ul.ddinput li { list-style:square; padding-left:25px; } 参数： format: &#8216;yyyy-mm-dd&#8217;,   // 日期格式化样式 monthRange: [-60, 60],     // 日期选择范围（月份） lang: &#8216;zh-cn&#8217;,    // 语言 offset: [0, 0],    // 日历弹出位置偏移量 firstDay: 0,     // 每月的第一天从何处开始 min: undefined,    // 日期最小选择范围 max: undefined,    // 日期最大选择范围 editable: 0,   // 是否开启可编辑 事件： onBeforeShow,   // 日历弹出前 onShow,     // 日历展开时 change,  [...]]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/jquery-double-dateinput/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>预知加载控件 （predict load）</title>
		<link>http://www.zhangjingwei.com/archives/predict-load/</link>
		<comments>http://www.zhangjingwei.com/archives/predict-load/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 07:05:47 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1775</guid>
		<description><![CDATA[时髦说法，这个叫做“预知加载”或者是“柔性前端”。 传统的说，就是将已经知道的异步接口在系统空闲时自动加载。 功能描述： 当页面载入完成时，利用空闲的时间加载这些异步的对象。 如果点击时这个对象已经加载完成，则直接使用，如果还没有加载，则直接加载。 使用方法： $elem.asynload( event, url, callback ); &#8211;Event: 事件类型( click hover mouseover mouseout …) &#8211;URL：数据接口对应的URL，目前只支持JSON &#8211;Callback: 回调函数 &#8212;-Data： 回调函数返回的接口对象 DEMO:http://www.zhangjingwei.com/demo/predload/ /** * @author jingweiz * Predict load JSON V1.0 * Syntax: $elem.asynload( event, url, callback ); */ &#160; &#40;function&#40;&#41;&#123; &#160; // 初始化HASH var hashKey = window.predictload &#124;&#124; &#123;&#125;, autoLoadHashKey = window.predictloadProcess [...]]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/predict-load/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>幸福科技找JavaScript工程师</title>
		<link>http://www.zhangjingwei.com/archives/xingfutech_javascript_engineer/</link>
		<comments>http://www.zhangjingwei.com/archives/xingfutech_javascript_engineer/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 03:37:27 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[代友招聘]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1768</guid>
		<description><![CDATA[代友招聘，具体如下： 北京人本幸福科技文化有限公司，成立于2010年12月24日，平安夜。幸福和平安是设立企业的初心。 公司目前有三条产品线，分别是数字出版、航空终端和商务社交。数字出版已推出包括知乎周刊在内的5本iPad电子杂志；航空终端是在飞机上铺设平板电脑，并开发阅读、影音、游戏等软件产品；商务社交方面，公司已领投创办一家商务社交企业——福建幸福商道，建立起1500多人的企业家俱乐部，未来俱乐部成员将通过一款App沟通互动。 幸福科技文化有限公司的战略方向，就是迅速建立起一家大型科技文化集团，她集技术开发、产品运营、商务社交、新媒体营销和风险投资等主要业务为一身。即时监测并应用最新鲜的技术解决方案，推出有幸福感和力量感的产品。 欢迎您的到来。 职位需求： 1、使用JavaScript编程两年以上经验。熟练运用JavaScript编程，曾经把JavaScript当做一门认真的语言进行全面学习，清晰地理解JavaScript面向对象编程的精髓。 2、掌握HTML5和CSS3。全面学习和掌握HTML5，具备使用HTML5建立网站的能力。 3、具备在Linux或者MacOS下的工作经验。能够使用Linux或MacOS下脚本语言进行工作。 4、具备MySQL或者MongoDB等数据库编程经验。 5、掌握Appcelerator Titanium编程经验者优先。 6、掌握Python编程、或者Node.js编程经验者优先。 7、具备英文阅读资料，更喜欢阅读英文的资料；对开源软件保持着持续追踪的热情；具备强烈的自我驱动力，前面几条不太满足，也可以考虑。 我们能提供： 1、待遇为5K-12K，根据能力浮动。 2、如果贡献更大，可享有现金和期权奖励。 工作地点： 北京，中关村 联系电话：15810490208 联系邮箱：ipanbin@gmail.com 公司网站：xingfutech.com]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/xingfutech_javascript_engineer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Select</title>
		<link>http://www.zhangjingwei.com/archives/jquery-select/</link>
		<comments>http://www.zhangjingwei.com/archives/jquery-select/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 16:03:35 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1762</guid>
		<description><![CDATA[TextMate下的中文看起来实在是费劲，所以就都去掉了。 使用很简单，select还是按照原来的BOM去写，然后构造对应DOM的jQuery对象，再调用selectinput方法即可。 BTW：下拉菜单的样式需要自己去写一下，对应的样式参数在conf.css这个对象下。 /* * Select zhangjingwei * Released under the MIT, BSD, and GPL Licenses. */ &#40;function &#40;$&#41; &#123; &#160; $.tools = $.tools &#124;&#124; &#123; version: '1.3' &#125;; &#160; var instances = &#91;&#93;, tool = $.tools.selectinput = &#123; conf: &#123; offset: 0, // 弹出菜单偏移量 trigger: false, // 默认触发 css: &#123; // ids root: 0, [...]]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/jquery-select/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>新浪乐居招聘前端工程师</title>
		<link>http://www.zhangjingwei.com/archives/leju_fe_engineer/</link>
		<comments>http://www.zhangjingwei.com/archives/leju_fe_engineer/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 07:09:10 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[代友招聘]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1757</guid>
		<description><![CDATA[朋友托付，代为招聘，新浪公司不表，乐居主要做房产相关，公司好，领导好，团队好。 直入正题，招聘前端工程师 要求： 1、常见技能都须满足，HTML,CSS是必须。 2、掌握javascript，有框架使用经验，有工程项目优先。 3、两年以上工作经验，硬性要求：专科以上学历。 待遇： 1、根据实际能力而定，能力好，挑战五位数月薪。 2、国家标准福利待遇，有补充医疗保险。（报90%） 3、14月薪（季度，年终），有加班费，有餐补，交通补，话费补，网费补，各种补。（不少！！！） 补充： 工作地点：北京（三元桥，海航大厦，东北三环） 有意愿加入的同学，别犹豫，直接简历到 lvbing@leju.sina.com.cn]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/leju_fe_engineer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>javascript 序列化</title>
		<link>http://www.zhangjingwei.com/archives/javascript-serialize/</link>
		<comments>http://www.zhangjingwei.com/archives/javascript-serialize/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 05:58:31 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1749</guid>
		<description><![CDATA[类似php中的serialize方法 BTW:当数据类型是null的时候,由于使用typeof 进行验证,所以会出现问题.(typeof null == &#8220;object&#8221;) // true function serialize&#40;_obj&#41; &#123; // Let Gecko browsers do this the easy way if &#40;typeof _obj.toSource !== 'undefined' &#38;&#38; typeof _obj.callee === 'undefined'&#41; &#123; return _obj.toSource&#40;&#41;; &#125; &#160; // Other browsers must do it the hard way switch &#40;typeof _obj&#41; &#123; // numbers, booleans, and functions are trivial: [...]]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/javascript-serialize/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>闲谈 node （初探）</title>
		<link>http://www.zhangjingwei.com/archives/%e9%97%b2%e8%b0%88-node-%ef%bc%88%e5%88%9d%e6%8e%a2%ef%bc%89/</link>
		<comments>http://www.zhangjingwei.com/archives/%e9%97%b2%e8%b0%88-node-%ef%bc%88%e5%88%9d%e6%8e%a2%ef%bc%89/#comments</comments>
		<pubDate>Thu, 12 May 2011 08:37:03 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[前端开发]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1718</guid>
		<description><![CDATA[以前编写js的时候，总是在各种浏览器之间纠结，有时纠结兼容性问题，有时纠结性能或效率，很多时候看着后端工程师玩弄着各种数据心里就痒痒，只能感叹，js不给力。 不过在这一切都是浮云的世界，什么都在变，就和打麻将一样，风水轮流转，无论是Python还是Ruby，无论是BigTable或是Dynamo，就连CPU都尼玛从双核到四核，甚至把“显卡”也集成进去了，咱们的JS也应该发光发热了吧？ 是的，一切都很给力，node就是这样，它就这样诞生了。 node，一个JS的运行环境，一个放在服务器上的JS运行环境，没错，他不是放在浏览器上，他是能像PHP一样跑在服务器上的运行环境。：） 我看到面前的PHP工程师笑了，我看到各位写C的同学笑了，好吧，正所谓拉车的用马，碾磨的用驴，面对日渐庞大的网络应用环境，面对无数用JS支撑起来的交互效果，面对数以万计想用JS干掉PHP的前端同学，让我们深究一下node究竟给不给力吧。 言归正传，无论是7天学会PHP还是7天学会C++第一步都是从“Hello World”，哦，不，是从安装环境开始，我们也入乡随俗，从这儿开始。 官方安装说明（https://github.com/joyent/node/wiki/Installation） 主要内容如下 git clone https://github.com/joyent/node.git cd node export JOBS=2 # optional, sets number of parallel commands. mkdir ~/local ./configure --prefix=$HOME/local/node make make install export PATH=$HOME/local/node/bin:$PATH 根据中国特色我们需要注意： 1、确认你的系统为Linux，Mac或者Solaris，如果你试图在Windows或者Unix上安装如果你试图在Windows或者Unix(除Mac OS外)上安装，请先尝试安装编译环境，可百度，一定很多。 2、安装libssl-dev和python，通常情况下他们都有。 3、如果是Mac，需要安装Xcode。 4、你也可以通过包管理器进行安装（https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager），看到这里我吐了。。。 5、因为最近墙有问题，所以大部分时候Git都很慢，请耐心等待或者翻墙。 好，现在我们 node -v 看看是否成功了吧！ 行了，到这里我们基本上就准备完成了，可以执行国际惯例，HelloWorld了。 console.log&#40;'hello world'&#41;; 前端同学一定惊呼，我x,好熟悉啊，这不是我们经常在firebug里面用的console么？是的，node使用console来输出调试，当然如果你喜欢步进调试，喜欢逆向工程中不断的下断点来调试，你可以尝试Qleelulu这样帅气的debug，虽然我认为这样非常低效。 好了，现在可以运行也可以调试了，我和同学们都兴奋了，我要写个百度乐居（AD），我要写个新浪微博（AD），我要写个淘宝（AD），我X，我怒吼，不要慌！俗话说得好，工欲善其事，必先利其器，让我们看看nodeJS的wiki上还有什么？ nom（node package manager） npm 是基于 node 的包管理器，通过npm，我们可以很容易的安装其它基于node的扩展 [...]]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/%e9%97%b2%e8%b0%88-node-%ef%bc%88%e5%88%9d%e6%8e%a2%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>构造函数(constructor)的超类</title>
		<link>http://www.zhangjingwei.com/archives/%e6%9e%84%e9%80%a0%e5%87%bd%e6%95%b0constructor%e7%9a%84%e8%b6%85%e7%b1%bb/</link>
		<comments>http://www.zhangjingwei.com/archives/%e6%9e%84%e9%80%a0%e5%87%bd%e6%95%b0constructor%e7%9a%84%e8%b6%85%e7%b1%bb/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 16:14:37 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1712</guid>
		<description><![CDATA[function test1&#40; name &#41;&#123; this.name = name; &#125; &#160; function test2&#40; name &#41;&#123; test1.call&#40;this,name&#41;; this.say = function&#40;&#41;&#123;&#125; &#125; &#160; test2.prototype = new test1; &#160; var t = new test2&#40;&#34;nihao&#34;&#41;; &#160; console.log&#40;t&#41;; console.log&#40;t.constructor&#41;; t的constructor说明了t的构造函数是test1，而不是test2。 这是因为t的constructor实际上是test2.prototype的constructor，而test2.prototype = new test1;因此test2test2.prototype的constructor属性就指向到了test1的prototype.constructor上test1.prototype的constructor上，也就是test1。 罗里吧嗦的，这标题起的还挺唬人的~呵呵]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/%e6%9e%84%e9%80%a0%e5%87%bd%e6%95%b0constructor%e7%9a%84%e8%b6%85%e7%b1%bb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript File API for Mozilla</title>
		<link>http://www.zhangjingwei.com/archives/javascript-file-api-for-mozilla/</link>
		<comments>http://www.zhangjingwei.com/archives/javascript-file-api-for-mozilla/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 15:30:46 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1705</guid>
		<description><![CDATA[1. 文件读取函数 readAsBinaryString() 读取文件内容，读取结果为一个 binary string。文件每一个 byte 会被表示为一个 [0..255] 区间内的整数。函数接受一个 File 对象作为参数。 readAsText() 读取文件内容，读取结果为一串代表文件内容的文本。函数接受一个 File 对象以及文本编码名称作为参数。 readAsDataURL 读取文件内容，读取结果为一个 data: 的 URL。DataURL 由 RFC2397 定义，具体可以参考 http://www.ietf.org/rfc/rfc2397.txt。 2. 文件读取事件 Onloadstart 文件读取开始时触发。 Progress 当读取进行中时定时触发。事件参数中会含有已读取总数据量。 Abort 当读取被中止时触发。 Error 当读取出错时触发。 Load 当读取成功完成时触发。 Loadend 当读取完成时，无论成功或者失败都会触发。 &#60;form name=&#34;demoForm&#34; id=&#34;demoForm&#34; method=&#34;post&#34; enctype=&#34;multipart/form-data&#34; onsubmit=&#34;uploadAndSubmit();return false;&#34;&#62; &#60;p&#62;Upload File: &#60;input type=&#34;file&#34; name=&#34;file&#34; /&#62;&#60;/p&#62; &#60;p&#62;&#60;input type=&#34;submit&#34; value=&#34;Submit&#34; [...]]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/javascript-file-api-for-mozilla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>函数的生成</title>
		<link>http://www.zhangjingwei.com/archives/%e5%87%bd%e6%95%b0%e7%9a%84%e7%94%9f%e6%88%90/</link>
		<comments>http://www.zhangjingwei.com/archives/%e5%87%bd%e6%95%b0%e7%9a%84%e7%94%9f%e6%88%90/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 13:58:18 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[前端开发]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1699</guid>
		<description><![CDATA[function create&#40;fun,proto&#41;&#123; var f=function&#40;&#41;&#123;&#125;; //Copy the object since it is going to be changed. for &#40;var x in proto&#41;&#123; f.prototype&#91;x&#93; = proto&#91;x&#93;; &#125; f.prototype.toString = fun; return new f; &#125; var fun=function&#40;&#41;&#123;alert&#40;&#34;a&#34;&#41;;return &#34;Hello world&#34;;&#125; var obj=&#123;x:5&#125; &#160; var foo=create&#40;fun,obj&#41;; alert&#40;foo&#41;; //Hello world foo.x=8; alert&#40;foo.x&#41;; // 8 delete foo.x; alert&#40;foo.x&#41;; // 5]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/%e5%87%bd%e6%95%b0%e7%9a%84%e7%94%9f%e6%88%90/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery inViewport</title>
		<link>http://www.zhangjingwei.com/archives/jquery-inviewport/</link>
		<comments>http://www.zhangjingwei.com/archives/jquery-inviewport/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 15:33:40 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[inViewport]]></category>
		<category><![CDATA[lazyload]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1690</guid>
		<description><![CDATA[晚上在微博上“拔赤”写了个lazyload插件，发现其中用到一个很有意思的方法&#8221;div.inViewportRegion()&#8221;，字面意思就是在可视区域内。 在网上找了找，发现这是YUI提供的一个组件，觉得很有意思。 http://gillserver.com/yui/api/dom-region.js.html 如果jQ里面也包含类似的方法，可以做很多事，于是GG了一下，发现国外的同学写过这种选择器，代码表现上更直观。 代码如下： &#40;function&#40;$&#41; &#123; &#160; $.belowthefold = function&#40;element, settings&#41; &#123; var fold = $&#40;window&#41;.height&#40;&#41; + $&#40;window&#41;.scrollTop&#40;&#41;; return fold &#60; = $&#40;element&#41;.offset&#40;&#41;.top - settings.threshold; &#125;; &#160; $.abovethetop = function&#40;element, settings&#41; &#123; var top = $&#40;window&#41;.scrollTop&#40;&#41;; return top &#62;= $&#40;element&#41;.offset&#40;&#41;.top + $&#40;element&#41;.height&#40;&#41; - settings.threshold; &#125;; &#160; $.rightofscreen = function&#40;element, settings&#41; &#123; var fold = [...]]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/jquery-inviewport/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>js ip地址转真实地址</title>
		<link>http://www.zhangjingwei.com/archives/js-get-ipaddress/</link>
		<comments>http://www.zhangjingwei.com/archives/js-get-ipaddress/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 16:43:31 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1681</guid>
		<description><![CDATA[新浪，有道，ip138提供了将ip地址转换为真实地址的接口，这个控件的作用就是将这些接口封装起来，实现js将ip地址转换为真实地址。 使用方法很简单，如有html &#60;div class=&#34;query_ip&#34;&#62;202.103.22.1&#60;/div&#62; 调用如下js $&#40;&#34;.query_ip&#34;&#41;.getaddress&#40;&#123; type:&#34;youdao&#34; // 支持youdao&#124;sina&#124;ip138 (有道速度快且准确，新浪快，ip138较慢) &#125;&#41;; 则将HTML修改为 &#60;div class=&#34;query_ip&#34;&#62;202.103.22.1 湖北省十堰市 东风电信&#60;/div&#62; 具体JS源码如下 &#40;function&#40;&#41;&#123; /* * 默认配置 */ var domainAddressConf = &#123; source : &#123; &#34;sina&#34;:&#34;http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&#38;ip=&#34;, &#34;youdao&#34;:&#34;http://youliao.sinaapp.com/app/getip.php?callback=?&#38;type=youdao&#38;ip=&#34;, &#34;ip138&#34;:&#34;http://youliao.sinaapp.com/app/getip.php?callback=?&#38;ip=&#34; &#125;, type : null, charset : &#34;gb2312&#34; &#125; &#160; function getAddress&#40; self,conf &#41;&#123; var type = conf.type &#124;&#124; &#34;youdao&#34;, ipadress = conf.source&#91;type&#93; + [...]]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/js-get-ipaddress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>无限级菜单</title>
		<link>http://www.zhangjingwei.com/archives/%e6%97%a0%e9%99%90%e7%ba%a7%e8%8f%9c%e5%8d%95/</link>
		<comments>http://www.zhangjingwei.com/archives/%e6%97%a0%e9%99%90%e7%ba%a7%e8%8f%9c%e5%8d%95/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 11:38:39 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1672</guid>
		<description><![CDATA[随手写了一个，实现不复杂，只支持动态树。 如果要用的话，获取数据哪里做下简单的修改就可以了，这只是一个Demo。 &#40;function&#40;$&#41;&#123; &#160; var jtree = &#123; treeid : &#34;jquery_tree_resource&#34;, treeclass : &#34;tree&#34;, idname : &#34;id&#34;, classname : &#34;name&#34;, optionname : &#34;options&#34;, openclass: &#34;switch_roots_open&#34;, closeclass: &#34;switch_roots_close&#34;, treeurl: &#34;&#34; &#125; &#160; // constructor function tree&#40;root, conf&#41; &#123; var self = root, cache = &#34;&#34;, // HTML缓存区 current = null, // 当前节点对象 counter = 0; // [...]]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/%e6%97%a0%e9%99%90%e7%ba%a7%e8%8f%9c%e5%8d%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>运算符的特殊行为</title>
		<link>http://www.zhangjingwei.com/archives/%e8%bf%90%e7%ae%97%e7%ac%a6%e7%9a%84%e7%89%b9%e6%ae%8a%e8%a1%8c%e4%b8%ba/</link>
		<comments>http://www.zhangjingwei.com/archives/%e8%bf%90%e7%ae%97%e7%ac%a6%e7%9a%84%e7%89%b9%e6%ae%8a%e8%a1%8c%e4%b8%ba/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 07:40:34 +0000</pubDate>
		<dc:creator>张经纬</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[运算符]]></category>

		<guid isPermaLink="false">http://www.zhangjingwei.com/?p=1663</guid>
		<description><![CDATA[加法运算符: 运算数是NaN、undefined，则结果为NaN Infinity加Infinity，结果为Infinity -Infinity加-Infinity，结果为-Infinity Infinity加-Infinity，结果为NaN 减法运算符： 运算数是NaN、undefined时，结果为NaN Infinity减Infinity，结果为NaN -Infinity减-Infinity，结果为NaN Infinity减-Infinity，结果为Infinity -Infinity减Infinity，结果为-Infinity 乘法运算符: 运算数是NaN，结果为NaN Infinity乘以0，结果为NaN 除法运算符: 运算数是NaN，结果为NaN Infinity除Infinity，结果为NaN 任何数除Infinity，结果为Infinity 0除非无穷大的数（Infinity），结果为是NaN 取模运算符: 运算数是NaN，结果为NaN 除数是0或者被除数是Infinity，结果为NaN Infinity除Infinity，结果为NaN 除数是Infinity，结果为被除数 被除数是0，结果为0]]></description>
		<wfw:commentRss>http://www.zhangjingwei.com/archives/%e8%bf%90%e7%ae%97%e7%ac%a6%e7%9a%84%e7%89%b9%e6%ae%8a%e8%a1%8c%e4%b8%ba/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

