<?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; input光标</title>
	<atom:link href="http://afei.name/archives/tag/input-focus/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获得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>
	</channel>
</rss>

