<?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.feeqi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.feeqi.com</link>
	<description>一起开始的旅程.</description>
	<lastBuildDate>Sun, 06 May 2012 16:27:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>题目叫无题</title>
		<link>http://www.feeqi.com/2012/05/07/%e9%a2%98%e7%9b%ae%e5%8f%ab%e6%97%a0%e9%a2%98/</link>
		<comments>http://www.feeqi.com/2012/05/07/%e9%a2%98%e7%9b%ae%e5%8f%ab%e6%97%a0%e9%a2%98/#comments</comments>
		<pubDate>Sun, 06 May 2012 16:27:37 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/?p=646403</guid>
		<description><![CDATA[内容是无，真的没有了。]]></description>
			<content:encoded><![CDATA[<p>内容是无，真的没有了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2012/05/07/%e9%a2%98%e7%9b%ae%e5%8f%ab%e6%97%a0%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>还是无题</title>
		<link>http://www.feeqi.com/2012/05/05/%e8%bf%98%e6%98%af%e6%97%a0%e9%a2%98/</link>
		<comments>http://www.feeqi.com/2012/05/05/%e8%bf%98%e6%98%af%e6%97%a0%e9%a2%98/#comments</comments>
		<pubDate>Sat, 05 May 2012 13:05:58 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/?p=646400</guid>
		<description><![CDATA[我喜欢听歌，喜欢听情歌 我喜欢唱歌，喜欢唱各种歌 但是KTV太贵了，还是自己在家玩玩就好。 不喜欢出去玩，一个人出去玩啥嘛，浪费钱，和自己珍重的人出去玩才好，就算多贵也没关系。 ============================================================================= 将心比心，假如我不喜欢的人每天给我嘘寒问暖，我是应该难过呢还是难过呢，还是难过呢。 曾经的我也是喜欢自由自在的，不被任何事情束缚，想做就做，不想做就躺倒睡一天。 有了爱，就有了责任，责任是我爱的人开心，快乐，幸福。 ============================================================================= 但是应该怎么做呢，完全没有头绪，也许就是默默的看着她，在她需要的时候出现在她身边就行了吧。在她不需要的时候躲得远远的，不去打扰。 可是我躲得远远的又怎样才能知道她需要我呢？ ============================================================================= 说上面那一段话的我，看起来那么道貌岸然，好像很无私。但是那只是骗人的，我也只是想索取一些才这样做的吧。 希望能够有你陪着我，能够说说各种心里话，能够拉着手一起压马路，能够以前去看感人的电影，能够去唱歌，能够去美丽的地方拍照…… 这样我就不用一个人那么怕周末，怕闲着了。 ============================================================================= 我一个人吃饭，旅行到处走走停停，只是为了希望在某个转角遇到一个人，能够相依。 ============================================================================= 每一条信息都是删了又写，写了又删，鼓起勇气发出去的，忐忑的看着上面显示“对方正在输入”，是不是有说错什么了。 也许我错了，还是应该做自己，做自己喜欢的事情。 不要掩饰什么，结果就算赤裸裸又怎样。 ============================================================================= 各种混乱，莫非定律说，越不想发生的事情就越容易发生。还是镇定的比较好，毕竟每天还是得睡觉、睡懒觉，吃饭、吃好吃的，干活、努力地干活。 ============================================================================= 当我孤单的时候，还是回想起很多以前没有联系的朋友的。 仍然深深的思恋你，直到你找到你要的幸福。]]></description>
			<content:encoded><![CDATA[<p>我喜欢听歌，喜欢听情歌<br />
我喜欢唱歌，喜欢唱各种歌<br />
但是KTV太贵了，还是自己在家玩玩就好。<br />
不喜欢出去玩，一个人出去玩啥嘛，浪费钱，和自己珍重的人出去玩才好，就算多贵也没关系。<br />
=============================================================================<br />
将心比心，假如我不喜欢的人每天给我嘘寒问暖，我是应该难过呢还是难过呢，还是难过呢。<br />
曾经的我也是喜欢自由自在的，不被任何事情束缚，想做就做，不想做就躺倒睡一天。<br />
有了爱，就有了责任，责任是我爱的人开心，快乐，幸福。<br />
=============================================================================<br />
但是应该怎么做呢，完全没有头绪，也许就是默默的看着她，在她需要的时候出现在她身边就行了吧。在她不需要的时候躲得远远的，不去打扰。<br />
可是我躲得远远的又怎样才能知道她需要我呢？<br />
=============================================================================<br />
说上面那一段话的我，看起来那么道貌岸然，好像很无私。但是那只是骗人的，我也只是想索取一些才这样做的吧。<br />
希望能够有你陪着我，能够说说各种心里话，能够拉着手一起压马路，能够以前去看感人的电影，能够去唱歌，能够去美丽的地方拍照……<br />
这样我就不用一个人那么怕周末，怕闲着了。<br />
=============================================================================<br />
我一个人吃饭，旅行到处走走停停，只是为了希望在某个转角遇到一个人，能够相依。<br />
=============================================================================<br />
每一条信息都是删了又写，写了又删，鼓起勇气发出去的，忐忑的看着上面显示“对方正在输入”，是不是有说错什么了。<br />
也许我错了，还是应该做自己，做自己喜欢的事情。<br />
不要掩饰什么，结果就算赤裸裸又怎样。<br />
=============================================================================<br />
各种混乱，莫非定律说，越不想发生的事情就越容易发生。还是镇定的比较好，毕竟每天还是得睡觉、睡懒觉，吃饭、吃好吃的，干活、努力地干活。<br />
=============================================================================<br />
当我孤单的时候，还是回想起很多以前没有联系的朋友的。<br />
仍然深深的思恋你，直到你找到你要的幸福。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2012/05/05/%e8%bf%98%e6%98%af%e6%97%a0%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>无题</title>
		<link>http://www.feeqi.com/2012/05/02/%e6%97%a0%e9%a2%98/</link>
		<comments>http://www.feeqi.com/2012/05/02/%e6%97%a0%e9%a2%98/#comments</comments>
		<pubDate>Wed, 02 May 2012 13:00:00 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/?p=646398</guid>
		<description><![CDATA[终于知道古人为啥总是用无题做标题了，真的是无法用简单的文字描述自己的心情吧。 今天特别的低落，反正我也觉得习惯了，又不是没经历过。 拿起手机打电话给好朋友，期盼能够说说话，也许心里就不那么难过了。 第一个号码，我很想一直等着，直到“用户忙”，可是还是淡然的挂掉了，可能他在忙吧。 第二个号码…… 第三个号码…… 哎，没有其他号码了。 ========================================================================= 哎，总会有时候特别想念以前的日子，仿佛以前的、过去的就是最美好的。 我已经学着珍惜现在的美好了，但是每次这样的时候还是忍不住想以前。 不想长大，长大了就有烦恼了，长大了就要为各种事情烦心。 我假装、的确很小的样子，让自己认为自己很小，不用担心未来。 可是，无论怎么做，未来还是来了。 ========================================================================= 以前只需要好好学习，每天做题就很好了，那就是我的工作。现在我得想想我做这些为了什么，每天工作，生活为了谁。 ========================================================================= 父母、爱人、子女，现在我只有父母，一切都是为了现在的这个温暖的家。每当难过低落的时候只有妈妈的电话才是总是能接通的。 ========================================================================= 曾经有那么短时间，我不相信爱情了，爱情是什么，不懂，爱的时候就是爱情，不爱的时候总是有那么一堆堆理由。 心仪的人有过那么多，但是重来没有变为相互的爱情。越是觉得珍惜的就越不敢说出口，于是变成了永恒的友情。 想过随便啦，随便谁不都是一样吗，何必那么难受。结果不那么在意的反而成就了，也许我遇到的两次都不叫爱情，第一次被伤害，第二次伤害了。难道就只是伤来伤去吗。 ========================================================================= 喜欢一个人静静的做点什么，安慰自己不需要别的，那是骗人的，看着别人甜蜜，除了羡慕又能怎样。 ========================================================================= 因为太珍惜所以不敢说，因为无所谓所以才说。到底要怎么样才能脱离这个圈套。是我错了吧，也许再不争取一次就没有机会了。 ========================================================================= 当那天晚上有人向你告白，虽然有心理准备，还是颤抖了。一直在准备，把那份感情酝酿的更芬芳，再告诉你，可是还是担心，把那个青涩的果实摘了下来。 ========================================================================= 没有浪漫的情书、没有鲜艳的玫瑰，什么都没有，只是很突然的告诉你这一切。 ========================================================================= 我知道有两个结局，第三天你会和我去看花、或者告诉我更适合做普通朋友。一夜无眠，等待结果。 第三天没有见到你。 ========================================================================= 哎，那我们重头开始吧。 ========================================================================= 每天期待的是两个字“晚安”，足矣。 ========================================================================= 能够打得通的电话还是只有妈妈的。呵呵。]]></description>
			<content:encoded><![CDATA[<p>终于知道古人为啥总是用无题做标题了，真的是无法用简单的文字描述自己的心情吧。<br />
今天特别的低落，反正我也觉得习惯了，又不是没经历过。<br />
拿起手机打电话给好朋友，期盼能够说说话，也许心里就不那么难过了。<br />
第一个号码，我很想一直等着，直到“用户忙”，可是还是淡然的挂掉了，可能他在忙吧。<br />
第二个号码……<br />
第三个号码……<br />
哎，没有其他号码了。<br />
=========================================================================<br />
哎，总会有时候特别想念以前的日子，仿佛以前的、过去的就是最美好的。<br />
我已经学着珍惜现在的美好了，但是每次这样的时候还是忍不住想以前。<br />
不想长大，长大了就有烦恼了，长大了就要为各种事情烦心。<br />
我假装、的确很小的样子，让自己认为自己很小，不用担心未来。<br />
可是，无论怎么做，未来还是来了。<br />
=========================================================================<br />
以前只需要好好学习，每天做题就很好了，那就是我的工作。现在我得想想我做这些为了什么，每天工作，生活为了谁。<br />
=========================================================================<br />
父母、爱人、子女，现在我只有父母，一切都是为了现在的这个温暖的家。每当难过低落的时候只有妈妈的电话才是总是能接通的。<br />
=========================================================================<br />
曾经有那么短时间，我不相信爱情了，爱情是什么，不懂，爱的时候就是爱情，不爱的时候总是有那么一堆堆理由。<br />
心仪的人有过那么多，但是重来没有变为相互的爱情。越是觉得珍惜的就越不敢说出口，于是变成了永恒的友情。<br />
想过随便啦，随便谁不都是一样吗，何必那么难受。结果不那么在意的反而成就了，也许我遇到的两次都不叫爱情，第一次被伤害，第二次伤害了。难道就只是伤来伤去吗。<br />
=========================================================================<br />
喜欢一个人静静的做点什么，安慰自己不需要别的，那是骗人的，看着别人甜蜜，除了羡慕又能怎样。<br />
=========================================================================<br />
因为太珍惜所以不敢说，因为无所谓所以才说。到底要怎么样才能脱离这个圈套。是我错了吧，也许再不争取一次就没有机会了。<br />
=========================================================================<br />
当那天晚上有人向你告白，虽然有心理准备，还是颤抖了。一直在准备，把那份感情酝酿的更芬芳，再告诉你，可是还是担心，把那个青涩的果实摘了下来。<br />
=========================================================================<br />
没有浪漫的情书、没有鲜艳的玫瑰，什么都没有，只是很突然的告诉你这一切。<br />
=========================================================================<br />
我知道有两个结局，第三天你会和我去看花、或者告诉我更适合做普通朋友。一夜无眠，等待结果。<br />
第三天没有见到你。<br />
=========================================================================<br />
哎，那我们重头开始吧。<br />
=========================================================================<br />
每天期待的是两个字“晚安”，足矣。<br />
=========================================================================<br />
能够打得通的电话还是只有妈妈的。呵呵。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2012/05/02/%e6%97%a0%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>和12580长得很像的12306，你懂的</title>
		<link>http://www.feeqi.com/2012/01/07/%e5%92%8c12580%e9%95%bf%e5%be%97%e5%be%88%e5%83%8f%e7%9a%8412306%ef%bc%8c%e4%bd%a0%e6%87%82%e7%9a%84/</link>
		<comments>http://www.feeqi.com/2012/01/07/%e5%92%8c12580%e9%95%bf%e5%be%97%e5%be%88%e5%83%8f%e7%9a%8412306%ef%bc%8c%e4%bd%a0%e6%87%82%e7%9a%84/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 05:46:05 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/?p=646358</guid>
		<description><![CDATA[取了一个这么肯跌的标题。 首先这篇文章的最佳读者是前端，当然你经常使用firebug也是可以试试。 可以买票前三天开始准备！，必须熟悉购票的完整流程。 第一章：怎样登陆12306 1、下载根证书、注册好账户，死活登陆不进去吧！这个我没有什么好办法，自己写一段简单的脚本自动重试，这个不是最好的办法。建议提前一个小时就开始尝试登陆系统，成功了就可以按照下面的步骤了。 2、进入查询界面 打开firebug，网络 就像这样子 点击查询后就会有这样的一个请求： https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=queryLeftTicket&#38;orderRequest.train_date=2012-01-11&#38;orderRequest.from_station_telecode=HZH&#38;orderRequest.to_station_telecode=VAP&#38;orderRequest.train_no=&#38;trainPassType=QB&#38;trainClass=QB%23D%23Z%23T%23K%23QT%23&#38;includeStudent=00&#38;seatTypeAndNum=&#38;orderRequest.start_time_str=00%3A00&#8211;24%3A00 把这个请求地址记录下来！！ 在新标签页中打开，可以看到这样的数据 为什么要把这个地址单独提取出来？是为了能够直接查询数据，而不用在页面上加载一些我们不需要的数据（为tdb减压啊！），更重要的是在这里！ 查看这个的代码，在你想要的车次上的按钮上右键 复制这段代码， &#60;input type=”button” value=”预订” onclick=”javascript:getSelected(&#8216;G32#06:24#07:17#5600000G3210#HZH#VNP#13:41#杭州#北京南#9198300026M105800125O063100364&#8242;)” onmouseout=”this.className=&#8217;yuding_u&#8217;” onmousedown=”this.className=&#8217;yuding_u_down&#8217;” onmousemove=”this.className=&#8217;yuding_u_over&#8217;” class=”yuding_u”&#62; 这段代码就是关键，至于里面的参数除了最后一个9198300026M105800125O063100364&#8242;不容易明白其余的都很容易 &#160; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; 最新研究发现可以这样做： 构造请求，直接跳过中间步骤！ 需要构造的url是这样的，请对照上面的&#8217;G32#06:24#07:17#5600000G3210#HZH#VNP#13:41#杭州#北京南#9198300026M105800125O063100364&#8242; 替换掉url的参数： &#160; https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=submutOrderRequest&#38;arrive_time=23%3A14&#38;from_station_name=%E6%9D%AD%E5%B7%9E&#38;from_station_telecode=HZH&#38;from_station_telecode_name=%E6%88%90%E9%83%BD&#38;include_student=00&#38;lishi=06%3A38&#38;round_start_time_str=00%3A00&#8211;24%3A00&#38;round_train_date=2012-01-07&#38;seattype_num=&#38;single_round_type=1&#38;start_time_str=00%3A00&#8211;24%3A00&#38;station_train_code=G44&#38;to_station_name=%E5%8C%97%E4%BA%AC%E5%8D%97&#38;to_station_telecode=VNP&#38;to_station_telecode_name=%E6%9D%AD%E5%B7%9E&#38;train_class_arr=QB%23D%23Z%23T%23K%23QT%23&#38;train_date=2012-01-07&#38;train_pass_type=QB&#38;train_start_time=16%3A36&#38;trainno=5600000G4420&#38;ypInfoDetail=9198300025M105800127O063100438 &#160; 服务器检查referer了，所以够着好这个链接url需要找一个12306网页上的a链接，把href替换成这个链接 比如车票预定这里： 然后点击车票预定就可以到确认订单页面了 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#160; 如果你的车次已经不能预订了，那就换一天的，换以前的，直到找到为止 &#160; 接下来你要做的事事演练，找一个月黑的时候，在放票前，很不幸你的票已经售完了吧，就像这样： 很伤心~我们的那段代码派上用场了： 找到你要得那趟车，比如这个： 点击这个编辑： 用刚才的那段准备好的代码替换这个 看你的按钮亮了吧！ 不过点击这个按钮是预定的北京的火车。 然后顺利进入购票页面，接着开始按照网上的另一篇教程修改乘车时间以及坐席类别 不要忙着提交，现在提交系统肯定会拒绝你购买的，票真的没有，就算你改了时间也是没有的。 你需要等着，等到放票时间开始后订票。 这期间你还要注意不要session过期（新开一个标签页面打开https://dynamic.12306.cn/otsweb/sysuser/user_info.jsp）几分钟刷新一次！（如果变成登陆界面千万不要去登陆，这个时候你应该还没掉线的，换个链接点击一下就可以了） &#160; 附上后续步骤的链接http://qing.weibo.com/2300267615/891b4c5f33000bub.html &#160; 大家会很奇怪为什么要让我保存input的那堆数据吧？ [...]]]></description>
			<content:encoded><![CDATA[<p>取了一个这么肯跌的标题。</p>
<p>首先这篇文章的最佳读者是前端，当然你经常使用firebug也是可以试试。</p>
<p>可以买票前三天开始准备！，必须熟悉购票的完整流程。</p>
<p>第一章：怎样登陆12306</p>
<p>1、下载根证书、注册好账户，死活登陆不进去吧！这个我没有什么好办法，自己写一段简单的脚本自动重试，这个不是最好的办法。<br />建议提前一个小时就开始尝试登陆系统，成功了就可以按照下面的步骤了。</p>
<p>2、进入查询界面</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb.png" width="244" height="56"></a></p>
<p>打开firebug，网络</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb1.png" width="244" height="74"></a></p>
<p>就像这样子</p>
<p>点击查询后就会有这样的一个请求：</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb2.png" width="244" height="8"></a></p>
<p><a title="https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=queryLeftTicket&amp;orderRequest.train_date=2012-01-11&amp;orderRequest.from_station_telecode=HZH&amp;orderRequest.to_station_telecode=VAP&amp;orderRequest.train_no=&amp;trainPassType=QB&amp;trainClass=QB%23D%23Z%23T%23K%23QT%23&amp;includeStudent=00&amp;seatTypeAndNum=&amp;orderRequest.start_time_str=00%3A00--24%3A00" href="https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=queryLeftTicket&amp;orderRequest.train_date=2012-01-11&amp;orderRequest.from_station_telecode=HZH&amp;orderRequest.to_station_telecode=VAP&amp;orderRequest.train_no=&amp;trainPassType=QB&amp;trainClass=QB%23D%23Z%23T%23K%23QT%23&amp;includeStudent=00&amp;seatTypeAndNum=&amp;orderRequest.start_time_str=00%3A00--24%3A00">https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=queryLeftTicket&amp;orderRequest.train_date=2012-01-11&amp;orderRequest.from_station_telecode=HZH&amp;orderRequest.to_station_telecode=VAP&amp;orderRequest.train_no=&amp;trainPassType=QB&amp;trainClass=QB%23D%23Z%23T%23K%23QT%23&amp;includeStudent=00&amp;seatTypeAndNum=&amp;orderRequest.start_time_str=00%3A00&#8211;24%3A00</a></p>
<p>把这个请求地址记录下来！！</p>
<p>在新标签页中打开，可以看到这样的数据</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb3.png" width="244" height="222"></a></p>
<p>为什么要把这个地址单独提取出来？是为了能够直接查询数据，而不用在页面上加载一些我们不需要的数据（为tdb减压啊！），更重要的是在这里！</p>
<p>查看这个的代码，在你想要的车次上的按钮上右键</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image4.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb4.png" width="244" height="191"></a></p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image5.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb5.png" width="244" height="56"></a></p>
<p>复制这段代码，</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image6.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb6.png" width="244" height="135"></a></p>
<blockquote><p>&lt;input type=”button” value=”预订” onclick=”javascript:getSelected(&#8216;G32#06:24#07:17#5600000G3210#HZH#VNP#13:41#杭州#北京南#9198300026M105800125O063100364&#8242;)” onmouseout=”this.className=&#8217;yuding_u&#8217;” onmousedown=”this.className=&#8217;yuding_u_down&#8217;” onmousemove=”this.className=&#8217;yuding_u_over&#8217;” class=”yuding_u”&gt;</p>
</blockquote>
<p><font color="#ff0000"><strong>这段代码就是关键</strong></font>，至于里面的参数除了最后一个9198300026M105800125O063100364&#8242;不容易明白其余的都很容易</p>
<p>&nbsp;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>最新研究发现可以这样做：</p>
<p>构造请求，直接跳过中间步骤！</p>
<p>需要构造的url是这样的，请对照上面的&#8217;G32#06:24#07:17#5600000G3210#HZH#VNP#13:41#杭州#北京南#9198300026M105800125O063100364&#8242; 替换掉url的参数：</p>
<p>&nbsp;</p>
<p><a title="https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=submutOrderRequest&amp;arrive_time=23%3A14&amp;from_station_name=%E6%9D%AD%E5%B7%9E&amp;from_station_telecode=HZH&amp;from_station_telecode_name=%E6%88%90%E9%83%BD&amp;include_student=00&amp;lishi=06%3A38&amp;round_start_time_str=00%3A00--24%3A00&amp;round_train_date=2012-01-07&amp;seattype_num=&amp;single_round_type=1&amp;start_time_str=00%3A00--24%3A00&amp;station_train_code=G44&amp;to_station_name=%E5%8C%97%E4%BA%AC%E5%8D%97&amp;to_station_telecode=VNP&amp;to_station_telecode_name=%E6%9D%AD%E5%B7%9E&amp;train_class_arr=QB%23D%23Z%23T%23K%23QT%23&amp;train_date=2012-01-07&amp;train_pass_type=QB&amp;train_start_time=16%3A36&amp;trainno=5600000G4420&amp;ypInfoDetail=9198300025M105800127O063100438" href="https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=submutOrderRequest&amp;arrive_time=23%3A14&amp;from_station_name=%E6%9D%AD%E5%B7%9E&amp;from_station_telecode=HZH&amp;from_station_telecode_name=%E6%88%90%E9%83%BD&amp;include_student=00&amp;lishi=06%3A38&amp;round_start_time_str=00%3A00--24%3A00&amp;round_train_date=2012-01-07&amp;seattype_num=&amp;single_round_type=1&amp;start_time_str=00%3A00--24%3A00&amp;station_train_code=G44&amp;to_station_name=%E5%8C%97%E4%BA%AC%E5%8D%97&amp;to_station_telecode=VNP&amp;to_station_telecode_name=%E6%9D%AD%E5%B7%9E&amp;train_class_arr=QB%23D%23Z%23T%23K%23QT%23&amp;train_date=2012-01-07&amp;train_pass_type=QB&amp;train_start_time=16%3A36&amp;trainno=5600000G4420&amp;ypInfoDetail=9198300025M105800127O063100438">https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=submutOrderRequest&amp;arrive_time=23%3A14&amp;from_station_name=%E6%9D%AD%E5%B7%9E&amp;from_station_telecode=HZH&amp;from_station_telecode_name=%E6%88%90%E9%83%BD&amp;include_student=00&amp;lishi=06%3A38&amp;round_start_time_str=00%3A00&#8211;24%3A00&amp;round_train_date=2012-01-07&amp;seattype_num=&amp;single_round_type=1&amp;start_time_str=00%3A00&#8211;24%3A00&amp;station_train_code=G44&amp;to_station_name=%E5%8C%97%E4%BA%AC%E5%8D%97&amp;to_station_telecode=VNP&amp;to_station_telecode_name=%E6%9D%AD%E5%B7%9E&amp;train_class_arr=QB%23D%23Z%23T%23K%23QT%23&amp;train_date=2012-01-07&amp;train_pass_type=QB&amp;train_start_time=16%3A36&amp;trainno=5600000G4420&amp;ypInfoDetail=9198300025M105800127O063100438</a></p>
<p>&nbsp;</p>
<p>服务器检查referer了，所以够着好这个链接url需要找一个12306网页上的a链接，把href替换成这个链接</p>
<p>比如车票预定这里：</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image13.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb13.png" width="213" height="244"></a></p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image14.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb14.png" width="244" height="54"></a></p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image15.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb15.png" width="244" height="55"></a></p>
<p>然后点击车票预定就可以到确认订单页面了</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image16.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb16.png" width="244" height="61"></a></p>
<p>&nbsp;</p>
<p>如果你的车次已经不能预订了，那就换一天的，换以前的，直到找到为止</p>
<p>&nbsp;</p>
<p>接下来你要做的事事演练，找一个月黑的时候，在放票前，很不幸你的票已经售完了吧，就像这样：</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image7.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb7.png" width="244" height="59"></a></p>
<p>很伤心~我们的那段代码派上用场了：</p>
<p>找到你要得那趟车，比如这个：</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image8.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb8.png" width="244" height="101"></a></p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image9.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb9.png" width="244" height="70"></a></p>
<p>点击这个编辑：</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image10.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb10.png" width="244" height="66"></a></p>
<p>用刚才的那段准备好的代码替换这个</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image11.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb11.png" width="244" height="33"></a></p>
<p>看你的按钮亮了吧！</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2012/01/image12.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2012/01/image_thumb12.png" width="244" height="54"></a></p>
<p>不过点击这个按钮是预定的北京的火车。</p>
<p>然后顺利进入购票页面，接着开始按照网上的另一篇教程修改乘车时间以及坐席类别</p>
<p>不要忙着提交，现在提交系统肯定会拒绝你购买的，票真的没有，就算你改了时间也是没有的。</p>
<p>你需要等着，等到放票时间开始后订票。</p>
<p>这期间你还要注意不要session过期（新开一个标签页面打开<a title="https://dynamic.12306.cn/otsweb/sysuser/user_info.jsp" href="https://dynamic.12306.cn/otsweb/sysuser/user_info.jsp">https://dynamic.12306.cn/otsweb/sysuser/user_info.jsp</a>）几分钟刷新一次！（如果变成登陆界面千万不要去登陆，这个时候你应该还没掉线的，换个链接点击一下就可以了）</p>
<p>&nbsp;</p>
<p>附上后续步骤的链接<a title="http://qing.weibo.com/2300267615/891b4c5f33000bub.html" href="http://qing.weibo.com/2300267615/891b4c5f33000bub.html">http://qing.weibo.com/2300267615/891b4c5f33000bub.html</a></p>
<p>&nbsp;</p>
<p>大家会很奇怪为什么要让我保存input的那堆数据吧？</p>
<p><strong><font color="#ff0000">如果按照网络上的那篇文章前提是你必须要找到一个和你一样的车次，而且要可以预定！那样的基本上是很困难的事情，我们把这段代码保存下来之后就不用担心这个问题了！</font></strong></p>
<p>&nbsp;</p>
<p>这里有那么点小东西，先不说了，大家试试吧，成功了就分享一下。在实施这个方法之前请一定找个朋友在另一台电脑上正常为你购票。不保证系统会不会变更了。</p>
<p>另外请再找一个朋友帮你不停地打95105105,，多种方法一起才是王道。</p>
<p>&nbsp;</p>
<p>祝愿大家都能买到票。祝愿12306不要502！</p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0507509063932703";
/* 468x60, 创建于 09-9-11 文章 */
google_ad_slot = "0291846552";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2012/01/07/%e5%92%8c12580%e9%95%bf%e5%be%97%e5%be%88%e5%83%8f%e7%9a%8412306%ef%bc%8c%e4%bd%a0%e6%87%82%e7%9a%84/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>KISSY的Switchable组件</title>
		<link>http://www.feeqi.com/2011/12/28/kissy%e7%9a%84switchable%e7%bb%84%e4%bb%b6/</link>
		<comments>http://www.feeqi.com/2011/12/28/kissy%e7%9a%84switchable%e7%bb%84%e4%bb%b6/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 15:30:52 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[前端]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/?p=646350</guid>
		<description><![CDATA[通过Slide来学习Switchable的实现方式。 神马是Slide，就是每天我们在淘宝首页之类的地方看见的轮播图 Slide的初始化很简单： Slide(&#8216;#demo2&#8242;, { effect: &#8216;scrolly&#8217;, // slide特效组件其实不需要 aria:false, easing: &#8216;easeOutStrong&#8217; }); 同样和Anim，此处是直接调用的Slide方法，在这个方法中会实例化一个Slide function Slide(container, config) { var self = this; // factory or constructor if (!(self instanceof Slide)) { return new Slide(container, config); } Slide.superclass.constructor.apply(self, arguments); } new Slide之后就重新调用父类的构造器，Slide的父类是Switchable。 Switchable的构造器是核心的东西，主要包括三部分：配置文件的初始化、功能初始化、switch到配置文件指定的页 function Switchable(container, config) { var self = this; // 调整配置信息 ……此处省略一些配置信息 var host [...]]]></description>
			<content:encoded><![CDATA[<p>通过Slide来学习Switchable的实现方式。</p>
<p>神马是Slide，就是每天我们在淘宝首页之类的地方看见的轮播图</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2011/12/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.feeqi.com/wp-content/uploads/2011/12/image_thumb.png" alt="image" width="240" height="86" border="0" /></a></p>
<p>Slide的初始化很简单：</p>
<blockquote><p>Slide(&#8216;#demo2&#8242;, {<br />
effect: &#8216;scrolly&#8217;,<br />
// slide特效组件其实不需要<br />
aria:false,<br />
easing: &#8216;easeOutStrong&#8217;<br />
});</p></blockquote>
<p><span style="background-color: #fafafa;"><span id="more-646350"></span>同样和Anim，此处是直接调用的Slide方法，在这个方法中会实例化一个Slide</span></p>
<blockquote><p>function Slide(container, config) {</p>
<p>var self = this;</p>
<p>// factory or constructor<br />
if (!(self instanceof Slide)) {<br />
return new Slide(container, config);<br />
}</p>
<p>Slide.superclass.constructor.apply(self, arguments);<br />
}</p></blockquote>
<p>new Slide之后就重新调用父类的构造器，Slide的父类是Switchable。</p>
<p>Switchable的构造器是核心的东西，主要包括三部分：配置文件的初始化、功能初始化、switch到配置文件指定的页</p>
<blockquote><p>function Switchable(container, config) {<br />
var self = this;</p>
<p>// 调整配置信息<br />
……此处省略一些配置信息<br />
var host = this.constructor;<br />
while (host) {<br />
config = S.merge(host.Config, config);<br />
host = host.superclass ? host.superclass.constructor : null;<br />
}<br />
……此处省略一些配置信息<br />
self._init();<br />
self._initPlugins();<br />
self.fire(EVENT_INIT);</p>
<p>if (self.activeIndex &gt; -1) {<br />
} else if (typeof config.switchTo == “number”) {<br />
self.switchTo(config.switchTo);<br />
}<br />
}</p></blockquote>
<p><span style="background-color: #fafafa;">配置文件的初始化主要的是markupType、向上历遍父类的的配置文件并合并在一起、配置第一次时展示的activeindex</span></p>
<p>switch到配置文件指定的页，只是调用switch方法</p>
<p>重点在于</p>
<blockquote><p>self._init();<br />
self._initPlugins();<br />
self.fire(EVENT_INIT);</p></blockquote>
<p><span style="background-color: #fafafa;">下篇文章继续跟进这些init。</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2011/12/28/kissy%e7%9a%84switchable%e7%bb%84%e4%bb%b6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>密码保护：正在听第四首歌</title>
		<link>http://www.feeqi.com/2011/12/24/%e6%ad%a3%e5%9c%a8%e5%90%ac%e7%ac%ac%e5%9b%9b%e9%a6%96%e6%ad%8c/</link>
		<comments>http://www.feeqi.com/2011/12/24/%e6%ad%a3%e5%9c%a8%e5%90%ac%e7%ac%ac%e5%9b%9b%e9%a6%96%e6%ad%8c/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 15:56:53 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[生活]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/?p=646345</guid>
		<description><![CDATA[无法提供摘要。这是一篇受保护的文章。]]></description>
			<content:encoded><![CDATA[<form action="http://www.feeqi.com/wp-pass.php" method="post">
<p>这是一篇受密码保护的文章。您需要提供访问密码：</p>
<p><label for="pwbox-646345">密码：<br />
<input name="post_password" id="pwbox-646345" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="提交" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2011/12/24/%e6%ad%a3%e5%9c%a8%e5%90%ac%e7%ac%ac%e5%9b%9b%e9%a6%96%e6%ad%8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kissy-anim-动画后form表单数据丢失</title>
		<link>http://www.feeqi.com/2011/12/09/kissy-anim-%e5%8a%a8%e7%94%bb%e5%90%8eform%e8%a1%a8%e5%8d%95%e6%95%b0%e6%8d%ae%e4%b8%a2%e5%a4%b1/</link>
		<comments>http://www.feeqi.com/2011/12/09/kissy-anim-%e5%8a%a8%e7%94%bb%e5%90%8eform%e8%a1%a8%e5%8d%95%e6%95%b0%e6%8d%ae%e4%b8%a2%e5%a4%b1/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 03:27:00 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/?p=646341</guid>
		<description><![CDATA[详细的走完了一次动画主流程，学习到了不少知识。分享一个遇到的问题。 问题出在对form表单里面的DOM节点动画。 为了获取DOM在动画后的真实样式，KISSY采用的方式是复制DOM节点来达到相应的目的。 但是复制后会发生一个问题，form中的元素，特别是radio，如果有相同的name丢回丢失选中的值。 demo是这样的，当我们随便选中一个radio，点击测试，就会发现radio的位置变化了。 formbugtest]]></description>
			<content:encoded><![CDATA[<p>详细的走完了一次动画主流程，学习到了不少知识。分享一个遇到的问题。</p>
<p>问题出在对form表单里面的DOM节点动画。</p>
<p>为了获取DOM在动画后的真实样式，KISSY采用的方式是复制DOM节点来达到相应的目的。</p>
<p>但是复制后会发生一个问题，form中的元素，特别是radio，如果有相同的name丢回丢失选中的值。</p>
<p>demo是这样的，当我们随便选中一个radio，点击测试，就会发现radio的位置变化了。</p>
<p><span id="more-646341"></span></p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2011/12/formbugtest.htm">formbugtest</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2011/12/09/kissy-anim-%e5%8a%a8%e7%94%bb%e5%90%8eform%e8%a1%a8%e5%8d%95%e6%95%b0%e6%8d%ae%e4%b8%a2%e5%a4%b1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kissy-anim-动画的实现方式-2</title>
		<link>http://www.feeqi.com/2011/12/09/kissy-anim-%e5%8a%a8%e7%94%bb%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e5%bc%8f-2/</link>
		<comments>http://www.feeqi.com/2011/12/09/kissy-anim-%e5%8a%a8%e7%94%bb%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e5%bc%8f-2/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 02:53:19 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/?p=646336</guid>
		<description><![CDATA[上一篇的准备工作都已经就绪，还没看见我们的动画动起来啊！ 现在就要开始动了。 1、上一步正则化的数据完成了，赋值到targetStyle中。 2、合并默认配置，包括动画持续时间、缓动类型（有一篇文章已经详细介绍）、回调函数。 默认配置： defaultConfig： duration: 1 easing: ”easeNone” nativeSupport: true 3、Anim的关键方法，run、stop等方法是通过S.augment处理。 S.augment(Anim, EventTarget, { /** * @type {boolean} 是否在运行 */ isRunning:false, /** * 动画开始到现在逝去的时间 */ elapsedTime:0, /** * 动画开始的时间 */ start:0, /** * 动画结束的时间 */ finish:0, /** * 动画持续时间，不间断的话 = finish-start */ duration:0, run: function() { }, _complete:function() { }, _runFrame:function() { }, _nativeRun: function() { [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>上一篇的准备工作都已经就绪，还没看见我们的动画动起来啊！</p></blockquote>
<p>现在就要开始动了。</p>
<p><span id="more-646336"></span>1、上一步正则化的数据完成了，赋值到targetStyle中。</p>
<p>2、合并默认配置，包括动画持续时间、缓动类型（有<a href="http://www.feeqi.com/2011/11/03/kissy%e5%8a%a8%e7%94%bb%e7%bc%93%e5%8a%a8%e5%87%bd%e6%95%b0/" target="_blank">一篇文章</a>已经详细介绍）、回调函数。</p>
<p>默认配置：</p>
<blockquote><p>defaultConfig：<br />
duration: 1<br />
easing: ”easeNone”<br />
nativeSupport: true</p></blockquote>
<p>3、Anim的关键方法，run、stop等方法是通过S.augment处理。</p>
<blockquote>
<pre>    S.augment(Anim, EventTarget, {
        /**
         * @type {boolean} 是否在运行
         */
        isRunning:false,
        /**
         * 动画开始到现在逝去的时间
         */
        elapsedTime:0,
        /**
         * 动画开始的时间
         */
        start:0,
        /**
         * 动画结束的时间
         */
        finish:0,
        /**
         * 动画持续时间，不间断的话 = finish-start
         */
        duration:0,
        run: function() {
        },
        _complete:function() {
        },
        _runFrame:function() {
        },
        _nativeRun: function() {
        },
        stop: function(finish) {
        },
        _nativeStop: function(finish) {
        },
        _clearNativeProperty:function() {
        }
    });</pre>
</blockquote>
<pre>4、继续进入run的方法中，首先初始化一堆参数,（接着尝试用fire启动anim start事件，如果fire成功那么run就完成）。</pre>
<blockquote>
<div>if (self.fire(EVENT_START) === false) {</div>
<div>    return;</div>
<div>}</div>
</blockquote>
<div>此处的fire结果是undefine，所以接着往下执行。</div>
<div>5、停止一次动画，相当于reset一次。</div>
<div>6、判断是否有transitionName，也就是浏览器原生的动画支持（-moz- -O- -webkit-三种特殊浏览器支持），如果有，那么就调用_nativeRun。</div>
<blockquote>
<div>
<div>if (self.transitionName) {</div>
<div>    // some hack ,Weird but ff/chrome need a break</div>
<div>    setTimeout(function() {</div>
<div>        self._nativeRun();</div>
<div>    }, 10);</div>
<div>} else {</div>
<div>     for (prop in target) {</div>
<div>         source[prop] = getAnimValue(elem, prop);</div>
<div>    }</div>
<div>    self.source = source;</div>
<div>    start = S.now();</div>
<div>    finish = start + duration;</div>
<div>    easing = config.easing;</div>
<div>    if (S.isString(easing)) {</div>
<div>        easing = Easing[easing] || Easing.easeNone;</div>
<div>    }</div>
<div>    self.start = start;</div>
<div>    self.finish = finish;</div>
<div>    self.easing = easing;</div>
<div>    AM.start(self);</div>
<div>}</div>
</div>
</blockquote>
<div>
<div>7、此次demo只是一个向右移动的简单动画，没有开启原生的动画支持，所以我们继续。</div>
<div>       开始赋值一些变量，主要是source（动画目标样式）、start（动画开始的时间戳）、finish（通过duration计算动画结束时候的时间戳）、easing（动画缓动类型，并且赋值缓动函数）。</div>
<div>8、AM.start，此处定义在另一个manager中，这个manager专用于管理动画，有个开始定时的startTimer，每20ms启动一次动画，调用runFrame函数。如果runFrame执行完毕startTimer就停止。</div>
<div>9、至此，所有的流程完毕，补充runFrame这个干了些啥。 runFrame是集中管理了多个DOM的动画，每个动画还是会回到base中的runFrame中，</div>
<blockquote>
<div>
<div>_runFrame:function() {</div>
<div>var self = this,</div>
<div>elem = self.domEl, finish = self.finish, start = self.start, duration = self.duration, time = S.now(), source = self.source, easing = self.easing, target = self.props, prop, elapsedTime; elapsedTime = time &#8211; start; var t = time &gt; finish ? 1 : elapsedTime / duration, sp, tp, b; self.elapsedTime = elapsedTime;</div>
<div>//S.log(“******************************** _runFrame”);</div>
<div>for (prop in target) {</div>
<div>sp = source[prop];</div>
<div>tp = target[prop];</div>
<div>// 没有发生变化的，直接略过</div>
<div>if (eqAnimValue(prop, tp, sp)) {</div>
<div>continue;</div>
<div>}</div>
<div>//S.log(prop);</div>
<div>//S.log(tp.v + ” : ” + sp.v + ” : ” + sp.u + ” : ” + tp.u);</div>
<div>// 比如 sp = { v: 0, u: &#8216;pt&#8217;} ( width: 0 时，默认单位是 pt )</div>
<div>// 这时要把 sp 的单位调整为和 tp 的一致</div>
<div>if (tp.v === 0) {</div>
<div>tp.u = sp.u;</div>
<div>}</div>
<div>// 单位不一样时，以 tp.u 的为主，同时 sp 从 0 开始</div>
<div>// 比如：ie 下 border-width 默认为 medium</div>
<div>if (sp.u !== tp.u) {</div>
<div>//S.log(prop + ” : ” + sp.v + ” : ” + sp.u);</div>
<div>//S.log(tp.f);</div>
<div>sp.v = 0;</div>
<div>sp.u = tp.u;</div>
<div>}</div>
<div>setAnimValue(elem, prop, tp.f(sp.v, tp.v, easing(t)) + tp.u);</div>
<div>/**</div>
<div>* 不能动画的量，直接设成最终值，下次不用动画，设置 dom 了</div>
<div>*/</div>
<div>if (tp.f == mirror) {</div>
<div>sp.v = tp.v;</div>
<div>sp.u = tp.u;</div>
<div>}</div>
<div>}</div>
<div>if ((self.fire(EVENT_STEP) === false) || (b = time &gt; finish)) {</div>
<div>// complete 事件只在动画到达最后一帧时才触发</div>
<div>self.stop(b);</div>
<div>}</div>
<div>}</div>
</div>
</blockquote>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2011/12/09/kissy-anim-%e5%8a%a8%e7%94%bb%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e5%bc%8f-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KISSY Anim 动画的实现方式-1</title>
		<link>http://www.feeqi.com/2011/12/06/kissy-anim-%e5%8a%a8%e7%94%bb%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e5%bc%8f-1/</link>
		<comments>http://www.feeqi.com/2011/12/06/kissy-anim-%e5%8a%a8%e7%94%bb%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e5%bc%8f-1/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 03:28:57 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/?p=646329</guid>
		<description><![CDATA[KISSY的动画是通过Anim类的方式实现的。一般我们使用动画类都是这样： Node.one(&#8216;#test2&#8242;).animate(&#8216;left: 500px&#8217;, 3, Easing.backOut); 在这个时候发生了那些事情呢，一步步跟踪看看： 1、经过一些简单的Node处理之后，会进入到function Anim(elem, props, duration, easing, callback, nativeSupport) 2、首先Anim会判断传入的elem是否合法，如果不合法就直接退出了 // ignore non-exist element if (!(elem = DOM.get(elem))) {     return; } 3、接下来会判断当前是否是实例化的Anim,如果不是立马进行实例化，并且返回。 // factory or constructor if (!(this instanceof Anim)) {     return new Anim(elem, props, duration, easing, callback, nativeSupport); } 4、重新进入实例化的Anim,继续2、3判断，开始初始化一些参数，比如是否使用浏览器原生动画、一些变量赋值等。 5、处理传入的props： var self = this,   [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>KISSY的动画是通过Anim类的方式实现的。一般我们使用动画类都是这样：</p>
<p>Node.one(&#8216;#test2&#8242;).animate(&#8216;left: 500px&#8217;, 3, Easing.backOut);</p></blockquote>
<p>在这个时候发生了那些事情呢，一步步跟踪看看：</p>
<p><span id="more-646329"></span>1、经过一些简单的Node处理之后，会进入到function Anim(elem, props, duration, easing, callback, nativeSupport)</p>
<p>2、首先Anim会判断传入的elem是否合法，如果不合法就直接退出了</p>
<blockquote>
<div>// ignore non-exist element</div>
<div>if (!(elem = DOM.get(elem))) {</div>
<div>    return;</div>
<div>}</div>
</blockquote>
<div>3、接下来会判断当前是否是实例化的Anim,如果不是立马进行实例化，并且返回。</div>
<blockquote>
<div>
<div>// factory or constructor</div>
<div>if (!(this instanceof Anim)) {</div>
<div>    return new Anim(elem, props, duration, easing, callback, nativeSupport);</div>
<div>}</div>
</div>
</blockquote>
<div>
<div>4、重新进入实例化的Anim,继续2、3判断，开始初始化一些参数，比如是否使用浏览器原生动画、一些变量赋值等。</div>
<div>5、处理传入的props：</div>
<blockquote>
<div>
<div>var self = this,</div>
<div>    isConfig = S.isPlainObject(duration),</div>
<div>    style = props,</div>
<div>    config;</div>
<div>/**</div>
<div>* the related dom element</div>
<div>*/</div>
<div>self.domEl = elem;</div>
<div>/**</div>
<div>* the transition properties</div>
<div>* 可以是 “width: 200px; color: #ccc” 字符串形式</div>
<div>* 也可以是 { width: &#8217;200px&#8217;, color: &#8216;#ccc&#8217; } 对象形式</div>
<div>*/</div>
<div>if (S.isPlainObject(style)) {</div>
<div>    style = String(S.param(style, &#8216;;&#8217;))</div>
<div>        .replace(/=/g, &#8216;:&#8217;)</div>
<div>        .replace(/%23/g, &#8216;#&#8217;)// 还原颜色值中的 #</div>
<div>        //注意：这里自定义属性也被 &#8211; 了，后面从字符串中取值时需要考虑</div>
<div>        .replace(/([a-z])([A-Z])/g, &#8216;$1-$2&#8242;)</div>
<div>        .toLowerCase(); // backgroundColor =&gt; background-color</div>
<div>}</div>
</div>
</blockquote>
<div>
<div>5.5、这里还要进一步处理props，官方说明叫正则化，</div>
<blockquote>
<div>
<div>//正则化，并且将shorthand属性分解成各个属性统一单独处理</div>
<div>//border:1px solid #fff =&gt;</div>
<div>//borderLeftWidth:1px</div>
<div>//borderLeftColor:#fff</div>
<div>self.props = normalize(style, elem);</div>
<div>// normalize 后：</div>
<div>// props = {</div>
<div>// width: { v: 200, unit: &#8216;px&#8217;, f: interpolate }</div>
<div>// color: { v: &#8216;#ccc&#8217;, unit: ”, f: color }</div>
<div>// }</div>
</div>
</blockquote>
<div>
<div>            normalize这个方法做的事情是在某些元素出于不可见状态下获取改元素的位置、大小等属性。</div>
<div>            具体的做法是复制一份这个元素为A，把A插入到其后面，设置A的样式为动画的目标样式，比如现在我们就会把A的left设置为500px。</div>
<div>             接下来会去取一个固定的样式列表，这个数组有45个样式。</div>
<blockquote>
<div>0: ”borderBottomWidth”<br />
1: ”borderBottomStyle”<br />
2: ”borderLeftWidth”<br />
3: ”borderLeftStyle”<br />
4: ”borderRightWidth”<br />
5: ”borderRightStyle”<br />
6: ”borderSpacing”<br />
7: ”borderTopWidth”<br />
8: ”borderTopStyle”<br />
9: ”bottom”<br />
10: ”fontFamily”<br />
11: ”fontSize”<br />
12: ”fontWeight”<br />
13: ”height”<br />
14: ”left”<br />
15: ”letterSpacing”<br />
16: ”lineHeight”<br />
17: ”marginBottom”<br />
18: ”marginLeft”<br />
19: ”marginRight”<br />
20: ”marginTop”<br />
21: ”maxHeight”<br />
22: ”maxWidth”<br />
23: ”minHeight”<br />
24: ”minWidth”<br />
25: ”opacity”<br />
26: ”outlineOffset”<br />
27: ”outlineWidth”<br />
28: ”paddingBottom”<br />
29: ”paddingLeft”<br />
30: ”paddingRight”<br />
31: ”paddingTop”<br />
32: ”right”<br />
33: ”textIndent”<br />
34: ”top”<br />
35: ”width”<br />
36: ”wordSpacing”<br />
37: ”zIndex”<br />
38: ”backgroundColor”<br />
39: ”borderBottomColor”<br />
40: ”borderLeftColor”<br />
41: ”borderRightColor”<br />
42: ”borderTopColor”<br />
43: ”color”<br />
44: ”outlineColor”</div>
</blockquote>
<div>              历遍获取，取值。</div>
<div>              接来还会对kissy自定义的样式进行取值，现阶段只有两个。</div>
<blockquote>
<div>["scrollLeft", "scrollTop"]</div>
</blockquote>
<div>               然后处理完毕，返回。</div>
<div>基本的预备处理已经ok。</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2011/12/06/kissy-anim-%e5%8a%a8%e7%94%bb%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e5%bc%8f-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>postMessage与window.name实现全系列浏览器跨域通讯</title>
		<link>http://www.feeqi.com/2011/12/05/postmessage%e4%b8%8ewindow-name%e5%ae%9e%e7%8e%b0%e5%85%a8%e7%b3%bb%e5%88%97%e6%b5%8f%e8%a7%88%e5%99%a8%e8%b7%a8%e5%9f%9f%e9%80%9a%e8%ae%af/</link>
		<comments>http://www.feeqi.com/2011/12/05/postmessage%e4%b8%8ewindow-name%e5%ae%9e%e7%8e%b0%e5%85%a8%e7%b3%bb%e5%88%97%e6%b5%8f%e8%a7%88%e5%99%a8%e8%b7%a8%e5%9f%9f%e9%80%9a%e8%ae%af/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 06:53:01 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[前端]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/?p=646324</guid>
		<description><![CDATA[先引用一段 在那些浏览器下会有跨域问题：http://www.36ria.com/3890 postMessage方式对于ie这样顽固的浏览器是无效的，我们采用一个变通的方式window.name来实现ie6、7下面的跨域。 简单的封装了一下： /** * postMessage类，用于跨域传输消息 */ function Message() { var self = this; this.callbackList = []; /** * 发送消息到指定的window或者contentWindow * @param target [DOM] 发送的目标 * @param data [String] 消息正文（不超过2M） */ this.send = function(target,data){ //如果target没有那么属性说明不是window或者iframe contentWindow，此处简单判断，可以加强 //if(!target.name) return; if (window.postMessage) { target.postMessage(data, '*'); }else{ target.name = data; } }; /** * 绑定事件监听，到接收到消息后触发回调函数 * @param [...]]]></description>
			<content:encoded><![CDATA[<p>先引用一段</p>
<p>在那些浏览器下会有跨域问题：<a href="http://www.36ria.com/3890">http://www.36ria.com/3890</a></p>
<p>postMessage方式对于ie这样顽固的浏览器是无效的，我们采用一个变通的方式window.name来实现ie6、7下面的跨域。<span id="more-646324"></span></p>
<p>简单的封装了一下：</p>
<blockquote>
<pre>	/**
	 * postMessage类，用于跨域传输消息
	 */
	function Message() {
		var self = this;

		this.callbackList = [];

		/**
		 * 发送消息到指定的window或者contentWindow
		 * @param target [DOM] 发送的目标
		 * @param data [String] 消息正文（不超过2M）
		 */
		this.send = function(target,data){
			//如果target没有那么属性说明不是window或者iframe contentWindow，此处简单判断，可以加强
			//if(!target.name) return;

			if (window.postMessage) {
				target.postMessage(data, '*');
			}else{
				target.name = data;
			}
		};
		/**
		 * 绑定事件监听，到接收到消息后触发回调函数
		 * @param callback [Function] 参数为data
		 */
		this.on = function(callback){
			if(typeof callback !== 'function') return;
			this.callbackList.push(callback);
		};
		this._trigger = function(data){
			for(var i = 0; i &lt; this.callbackList.length; i++){
				this.callbackList[i].call(window,data);
			}
		};

		if (window.postMessage) {
			if (window.addEventListener) {
				window.addEventListener("message", function(e) {
						self._trigger(e.data);
					}, false);
			} else if (window.attachEvent) {
				window.attachEvent("onmessage", function(e) {
						self._trigger(e.data);
					});
			}
		} else {
			var hash = window.name = '';

			setInterval(function() {
				if (window.name !== hash) {
					hash = window.name;
					var tmp = hash;
					hash = window.name = '';
					self._trigger(tmp);
				}
			},
			50);
		}
	}</pre>
</blockquote>
<pre>使用方式很简单，假如有两个页面</pre>
<ul>
<li>a.com/main.htm</li>
<li>b.com/i.htm</li>
</ul>
<pre>第一个页面接受第二个页面发送的消息，在a中：</pre>
<blockquote>
<pre>var msg = new Message();
msg.on(function(data){
    alert(data);
    //处理接收到的data
});</pre>
</blockquote>
<pre>b中：</pre>
<blockquote>
<pre>var msg = new Message();
msg.send(window.top,'my message from b!');</pre>
</blockquote>
<pre>同样a也可以发送消息给b，并且b监听事件。</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2011/12/05/postmessage%e4%b8%8ewindow-name%e5%ae%9e%e7%8e%b0%e5%85%a8%e7%b3%bb%e5%88%97%e6%b5%8f%e8%a7%88%e5%99%a8%e8%b7%a8%e5%9f%9f%e9%80%9a%e8%ae%af/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

