<?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>Sat, 07 Jan 2012 06:34:07 +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>和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>2</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>
		<item>
		<title>background-image在ie6和某个版本的搜狗下面失效的bug</title>
		<link>http://www.feeqi.com/2011/11/23/background-image%e5%9c%a8ie6%e5%92%8c%e6%9f%90%e4%b8%aa%e7%89%88%e6%9c%ac%e7%9a%84%e6%90%9c%e7%8b%97%e4%b8%8b%e9%9d%a2%e5%a4%b1%e6%95%88%e7%9a%84bug/</link>
		<comments>http://www.feeqi.com/2011/11/23/background-image%e5%9c%a8ie6%e5%92%8c%e6%9f%90%e4%b8%aa%e7%89%88%e6%9c%ac%e7%9a%84%e6%90%9c%e7%8b%97%e4%b8%8b%e9%9d%a2%e5%a4%b1%e6%95%88%e7%9a%84bug/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 03:13:10 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[前端]]></category>

		<guid isPermaLink="false">http://www.feeqi.com/2011/11/23/background-image%e5%9c%a8ie6%e5%92%8c%e6%9f%90%e4%b8%aa%e7%89%88%e6%9c%ac%e7%9a%84%e6%90%9c%e7%8b%97%e4%b8%8b%e9%9d%a2%e5%a4%b1%e6%95%88%e7%9a%84bug/</guid>
		<description><![CDATA[有可能(某些版本的ie6、sogou,具体未知)就没有背景了。然后把background-image换成background就好了]]></description>
			<content:encoded><![CDATA[<p>很简单的一段，有一个button：</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2011/11/image.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2011/11/image_thumb.png" width="244" height="97" /></a></p>
<p>这个button正常情况下是有背景图片的</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2011/11/image1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2011/11/image_thumb1.png" width="244" height="192" /></a></p>
<p>第一次的写法是这样，</p>
<pre class="brush:html">
<html>
	<head>
<style>
			.btn1 {
				height:29px;
				border:none;
				cursor:pointer;
				float:left;
				width:87px;
				background-image:url(http://img01.taobaocdn.com/tps/i1/T1.imBXaFRXXXXXXXX-140-183.png);
				background-position:-6px 0;
			}
		</style>
<div id="page">
<form class="J_FormMarket" method="get" action="http://yingyong.taobao.com/search.htm" target="_top">
	                <button class="J_SearchMarket btn1" type="submit" data-static="4.0.0"></button>
	            </form>
</div>
</pre>
<p>看起来完全没问题,但是在ie6下面,有可能(某些版本的ie6、sogou,具体未知)就没有背景了。然后把background-image换成background就好了</p>
<p><a href="http://www.feeqi.com/wp-content/uploads/2011/11/image2.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.feeqi.com/wp-content/uploads/2011/11/image_thumb2.png" width="244" height="59" /></a></p>
<p>记录一下，希望有用。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2011/11/23/background-image%e5%9c%a8ie6%e5%92%8c%e6%9f%90%e4%b8%aa%e7%89%88%e6%9c%ac%e7%9a%84%e6%90%9c%e7%8b%97%e4%b8%8b%e9%9d%a2%e5%a4%b1%e6%95%88%e7%9a%84bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>不配置环境变量使用ant（绿色版的ant）</title>
		<link>http://www.feeqi.com/2011/11/06/%e4%b8%8d%e9%85%8d%e7%bd%ae%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f%e4%bd%bf%e7%94%a8ant%ef%bc%88%e7%bb%bf%e8%89%b2%e7%89%88%e7%9a%84ant%ef%bc%89/</link>
		<comments>http://www.feeqi.com/2011/11/06/%e4%b8%8d%e9%85%8d%e7%bd%ae%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f%e4%bd%bf%e7%94%a8ant%ef%bc%88%e7%bb%bf%e8%89%b2%e7%89%88%e7%9a%84ant%ef%bc%89/#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">/?p=646003</guid>
		<description><![CDATA[build.bat是windows下的批处理文件，可以做很多事情（包括ant会的文件删除、创建、修改、合并等等）。

但是这次我们只是简单的利用批处理文件的修改文件查找路径（PATH变量），这样修改的只会在当前的cmd窗口中生效，

当关闭这个窗口之后所有的又回梦了。

]]></description>
			<content:encoded><![CDATA[<p>ant是一个build工具，提高干活效率的好工具。</p>
<p>ant需要java运行环境。</p>
<p>在继续往下看之前的前提是你已经有安装好java环境了。</p>
<p>&nbsp;</p>
<p>首先：需要下载Ant，解压到一个目录。（<a href="http://www.apache.org/dist/ant/binaries">http://www.apache.org/dist/ant/binaries</a>）</p>
<p>比如我解压到x:worklibant</p>
<p><a href="http://lansepink.appspot.com/media/aglsYW5zZXBpbmtyDQsSBU1lZGlhGNm-Jww"><img style="background-image: none; border-bottom: 0px; border-left: 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://lansepink.appspot.com/media/aglsYW5zZXBpbmtyDQsSBU1lZGlhGPK2Jww" width="475" height="316"></a></p>
<p>准备工作完成。</p>
<p>接下来在你的工作目录创建一个build.bat文件。</p>
<pre class="brush:bat">SET PATH=X:worklibantbin;%PATH%
SET ANT_HOME=X:worklibant

ant -version
ant
pause
</pre>
<p>完成！，你可以在这个目录下创建你需要的build.xml文件。需要运行的时候双击build.bat。</p>
<p><a href="http://lansepink.appspot.com/media/aglsYW5zZXBpbmtyDQsSBU1lZGlhGKnOJww"><img style="background-image: none; border-bottom: 0px; border-left: 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://lansepink.appspot.com/media/aglsYW5zZXBpbmtyDQsSBU1lZGlhGJHWJww" width="478" height="315"></a></p>
<p>最后说一下：build.bat是windows下的批处理文件，可以做很多事情（包括ant会的文件删除、创建、修改、合并等等）。</p>
<p>但是这次我们只是简单的利用批处理文件的修改文件查找路径（PATH变量），这样修改的只会在当前的cmd窗口中生效，</p>
<p>当关闭这个窗口之后所有的又回梦了。</p>
<p>这样做的好处是：</p>
<p>1、可以携带我们的ant在其他任意电脑上干活（只要把libant,还有你的项目目录随时携带，当然最好的方式是通过同步工具同步）。</p>
<p>2、还有个没有验证的好处是可以保持电脑的清洁，不太确定环境变量多了会不会影响电脑速度。</p>
<p>如果你看完这个方法之后觉得jdk也是个累赘的话也可以试试这样做。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.feeqi.com/2011/11/06/%e4%b8%8d%e9%85%8d%e7%bd%ae%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f%e4%bd%bf%e7%94%a8ant%ef%bc%88%e7%bb%bf%e8%89%b2%e7%89%88%e7%9a%84ant%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KISSY动画缓动函数</title>
		<link>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/</link>
		<comments>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/#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>suna</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">/?p=634006</guid>
		<description><![CDATA[在KISSY1.2中有16中中缓动函数。

先解释什么叫缓动函数。这个的从物理的角度描述了。

我们都知道自由落体运动，理想情况下，自由落体就是一个速度不断加快的运动。

用函数表示就Y=kX2

所有感觉很舒服的动画总会或多或少的使用各种缓动效果
]]></description>
			<content:encoded><![CDATA[<p>在KISSY1.2中有16中中缓动函数。</p>
<p>先解释什么叫缓动函数。这个的从物理的角度描述了。</p>
<p>我们都知道自由落体运动，理想情况下，自由落体就是一个速度不断加快的运动。</p>
<p>用函数表示就Y=kX<sup>2</sup></p>
<p>所有感觉很舒服的动画总会或多或少的使用各种缓动效果</p>
<p>Robert Penner 博士的缓动函数介绍</p>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"<br />
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"<br />
 WIDTH="640" HEIGHT="480" id="easing_demo" ALIGN="">  <PARAM NAME="movie" VALUE="http://www.robertpenner.com/easing/easing_demo.swf"> <PARAM NAME="quality" VALUE="high"> <PARAM NAME="bgcolor" VALUE="#000000">
<param value="transparent" name="wmode">  <EMBED src="http://www.robertpenner.com/easing/easing_demo.swf" quality="high" bgcolor="#000000" WIDTH="640" HEIGHT="480" NAME="easing_demo" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" wmode="transparent"></EMBED> </OBJECT>
<p>使用缓动之后的动画会让人感觉很自然.</p>
<p>KISSY中的缓动函数定义在srcanimeasing.js</p>
<pre class="brush:js">/**
             * Uniform speed between points.
             */
            easeNone: function (t) {
                return t;
            },

            /**
             * Begins slowly and accelerates towards end. (quadratic)
             */
            easeIn: function (t) {
                return t * t;
            },

            /**
             * Begins quickly and decelerates towards end.  (quadratic)
             */
            easeOut: function (t) {
                return ( 2 - t) * t;
            },

            /**
             * Begins slowly and decelerates towards end. (quadratic)
             */
            easeBoth: function (t) {
                return (t *= 2) &lt; 1 ?
                    .5 * t * t :
                    .5 * (1 - (--t) * (t - 2));
            },

            /**
             * Begins slowly and accelerates towards end. (quartic)
             */
            easeInStrong: function (t) {
                return t * t * t * t;
            },

            /**
             * Begins quickly and decelerates towards end.  (quartic)
             */
            easeOutStrong: function (t) {
                return 1 - (--t) * t * t * t;
            },

            /**
             * Begins slowly and decelerates towards end. (quartic)
             */
            easeBothStrong: function (t) {
                return (t *= 2) &lt; 1 ?
                    .5 * t * t * t * t :
                    .5 * (2 - (t -= 2) * t * t * t);
            },

            /**
             * Snap in elastic effect.
             */

            elasticIn: function (t) {
                var p = .3, s = p / 4;
                if (t === 0 || t === 1) return t;
                return -(pow(2, 10 * (t -= 1)) * sin((t - s) * (2 * PI) / p));
            },

            /**
             * Snap out elastic effect.
             */
            elasticOut: function (t) {
                var p = .3, s = p / 4;
                if (t === 0 || t === 1) return t;
                return pow(2, -10 * t) * sin((t - s) * (2 * PI) / p) + 1;
            },

            /**
             * Snap both elastic effect.
             */
            elasticBoth: function (t) {
                var p = .45, s = p / 4;
                if (t === 0 || (t *= 2) === 2) return t;

                if (t &lt; 1) {
                    return -.5 * (pow(2, 10 * (t -= 1)) *
                        sin((t - s) * (2 * PI) / p));
                }
                return pow(2, -10 * (t -= 1)) *
                    sin((t - s) * (2 * PI) / p) * .5 + 1;
            },

            /**
             * Backtracks slightly, then reverses direction and moves to end.
             */
            backIn: function (t) {
                if (t === 1) t -= .001;
                return t * t * ((BACK_CONST + 1) * t - BACK_CONST);
            },

            /**
             * Overshoots end, then reverses and comes back to end.
             */
            backOut: function (t) {
                return (t -= 1) * t * ((BACK_CONST + 1) * t + BACK_CONST) + 1;
            },

            /**
             * Backtracks slightly, then reverses direction, overshoots end,
             * then reverses and comes back to end.
             */
            backBoth: function (t) {
                if ((t *= 2 ) &lt; 1) {
                    return .5 * (t * t * (((BACK_CONST *= (1.525)) + 1) * t - BACK_CONST));
                }
                return .5 * ((t -= 2) * t * (((BACK_CONST *= (1.525)) + 1) * t + BACK_CONST) + 2);
            },

            /**
             * Bounce off of start.
             */
            bounceIn: function (t) {
                return 1 - Easing.bounceOut(1 - t);
            },

            /**
             * Bounces off end.
             */
            bounceOut: function (t) {
                var s = 7.5625, r;

                if (t &lt; (1 / 2.75)) {
                    r = s * t * t;
                }
                else if (t &lt; (2 / 2.75)) {
                    r = s * (t -= (1.5 / 2.75)) * t + .75;
                }
                else if (t &lt; (2.5 / 2.75)) {
                    r = s * (t -= (2.25 / 2.75)) * t + .9375;
                }
                else {
                    r = s * (t -= (2.625 / 2.75)) * t + .984375;
                }

                return r;
            },

            /**
             * Bounces off start and end.
             */
            bounceBoth: function (t) {
                if (t &lt; .5) {
                    return Easing.bounceIn(t * 2) * .5;
                }
                return Easing.bounceOut(t * 2 - 1) * .5 + .5;
            }</pre>
<p>基本上KISSY已经把所有我们可能用的到的缓动函数都已经写好了.</p>
]]></content:encoded>
			<wfw:commentRss>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/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: www.feeqi.com @ 2012-02-09 10:25:13 -->
