<?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>疯子阿飞 &#187; JavaScript</title>
	<atom:link href="http://afei.name/archives/tag/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://afei.name</link>
	<description>Blog of Mad Charlie</description>
	<lastBuildDate>Mon, 12 Dec 2011 17:16:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>使用javascript与indeterminate实现三态checkbox</title>
		<link>http://afei.name/archives/267</link>
		<comments>http://afei.name/archives/267#comments</comments>
		<pubDate>Wed, 10 Mar 2010 08:39:47 +0000</pubDate>
		<dc:creator>阿飞</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.afei.name/?p=267</guid>
		<description><![CDATA[当checkbox的indeterminate设置为true的时候, input会变成灰色打勾的状态. IE一直支持此属性, 而Firefox却不支持.不过在最新的Firefox3.6中, 也开始支持这个属性了. 我们可以用简单的javascript来实现三态checkbox. $&#40;&#34;input:checkbox&#34;&#41;.live&#40;&#34;click&#34;,function&#40;&#41; &#123; if&#40;this.getAttribute&#40;&#34;checked&#34;&#41; &#38;amp;&#38;amp; !this.getAttribute&#40;&#34;indeterminate&#34;&#41;&#41; &#123; this.setAttribute&#40;&#34;indeterminate&#34;, true&#41;; this.setAttribute&#40;&#34;indeterminate-status&#34;, true&#41;; return false; &#125; else if&#40;!this.getAttribute&#40;&#34;indeterminate&#34;&#41; &#38;amp;&#38;amp; this.getAttribute&#40;&#34;indeterminate-status&#34;&#41;&#41; &#123; this.setAttribute&#40;&#34;checked&#34;, true&#41;; this.removeAttribute&#40;&#34;indeterminate-status&#34;&#41;; return true; &#125; &#125;&#41;;]]></description>
		<wfw:commentRss>http://afei.name/archives/267/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>javascript获得INPUT中的光标位置</title>
		<link>http://afei.name/archives/106</link>
		<comments>http://afei.name/archives/106#comments</comments>
		<pubDate>Tue, 28 Jul 2009 06:13:20 +0000</pubDate>
		<dc:creator>阿飞</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[input光标]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.afei.name/?p=106</guid>
		<description><![CDATA[使用JavaScript获取input光标，这里只介绍常用的IE和Firefox中的方法： 在Firefox中非常简单，在IE中非常强大，两种不同的获取方式如下： function GetPosition&#40;input&#41; &#123; if&#40;$.browser.msie&#41; &#123; var cuRange=document.selection.createRange&#40;&#41;; var tbRange=input.createTextRange&#40;&#41;; tbRange.collapse&#40;true&#41;; tbRange.select&#40;&#41;; var headRange=document.selection.createRange&#40;&#41;; headRange.setEndPoint&#40;&#34;EndToEnd&#34;,cuRange&#41;; var pos=headRange.text.length; cuRange.select&#40;&#41;; return pos; &#125; else return input.selectionStart; &#125;]]></description>
		<wfw:commentRss>http://afei.name/archives/106/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>跨域调用Flash中的超链接打不开的解决方法</title>
		<link>http://afei.name/archives/15</link>
		<comments>http://afei.name/archives/15#comments</comments>
		<pubDate>Wed, 01 Jul 2009 15:41:38 +0000</pubDate>
		<dc:creator>阿飞</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.afei.name/archives/15</guid>
		<description><![CDATA[在&#60;embed&#62;标签中加上 allowScriptAccess=&#8221;always&#8221; 这一属性即可 &#60;embed allowScriptAccess=&#34;always&#34;... /&#62;]]></description>
		<wfw:commentRss>http://afei.name/archives/15/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

