<?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; onblur</title>
	<atom:link href="http://www.simcn.com/tag/onblur/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simcn.com</link>
	<description>网站开发, 前端开发, 高性能前端开发</description>
	<lastBuildDate>Tue, 27 Mar 2012 04:26:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>jquery 处理表单元素得到焦点与失去焦点</title>
		<link>http://www.simcn.com/jquery-onblur-onfocus</link>
		<comments>http://www.simcn.com/jquery-onblur-onfocus#comments</comments>
		<pubDate>Fri, 19 Jun 2009 05:35:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[默认分类]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[onblur]]></category>
		<category><![CDATA[onfocus]]></category>

		<guid isPermaLink="false">http://www.simcn.com/2009/06/jquery-%e5%a4%84%e7%90%86%e8%a1%a8%e5%8d%95%e5%85%83%e7%b4%a0%e5%be%97%e5%88%b0%e7%84%a6%e7%82%b9%e4%b8%8e%e5%a4%b1%e5%8e%bb%e7%84%a6%e7%82%b9/</guid>
		<description><![CDATA[/*处理表单元素得到焦点与失去焦点*/ jQuery('.input_text').focus(function(){ var i = jQuery(this).attr('init_val'); var t = jQuery(this).attr('user_val'); if(i==undefined){ //记录初始值 jQuery(this).attr('init_val',jQuery(this).val()); jQuery(this).val(''); }else if(i==jQuery(this).val()){ jQuery(this).val(''); }else{ jQuery(this).val(t); } jQuery(this).css('color','#333'); }).blur(function(){ i = jQuery(this).attr('init_val'); if(jQuery(this).val()==''&#124;&#124; jQuery(this).val()==i){ jQuery(this).css('color','#bbb'); jQuery(this).val(jQuery(this).attr('init_val')); }else{ jQuery(this).attr('user_val',jQuery(this).val()); jQuery(this).css('color','#333'); } });]]></description>
		<wfw:commentRss>http://www.simcn.com/jquery-onblur-onfocus/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

