<?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; select</title>
	<atom:link href="http://www.deepseath.com/?feed=rss2&#038;tag=select" rel="self" type="application/rss+xml" />
	<link>http://www.deepseath.com</link>
	<description></description>
	<lastBuildDate>Mon, 29 Jan 2024 09:55:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>收集一下jQuery关于select标签的操作</title>
		<link>http://www.deepseath.com/?p=660</link>
		<comments>http://www.deepseath.com/?p=660#comments</comments>
		<pubDate>Mon, 03 May 2010 17:05:49 +0000</pubDate>
		<dc:creator>Deepseath</dc:creator>
				<category><![CDATA[日积月累]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[select]]></category>

		<guid isPermaLink="false">http://www.deepseath.com/?p=660</guid>
		<description><![CDATA[jQuery是一个非常好玩的东东，很方便。由于本身对于javascript并不是非常的精通，因此特别对于操作select标签操作机器不入脑。 收集一下关于select标签操作的例子，备忘一下吧，出处找不到了。 //获取第一个option的值 $('#test option:first').val(); //最后一个option的值 $('#test option:last').val(); //获取第二个option的值 $('#test option:eq(1)').val(); //获取选中的值 $('#test').val(); $('#test option:selected').val(); //设置值为2的option为选中状态 $('#test').attr('value','2'); //设置第一个option为选中 $('#test option:last').attr('selected','selected'); $("#test").attr('value' , $('#test option:last').val()); $("#test").attr('value' , $('#test option').eq($('#test option').length - 1).val()); //获取select的长度 $('#test option').length; //添加一个option $("#test").append(" ff "); $(" ff ").appendTo("#test"); //添除选中项 $('#test option:selected').remove(); //指定项选中 $('#test option:first').remove(); //指定值被删除 $('#test option').each(function(){ if( $(this).val() == '5'){ $(this).remove(); [...]]]></description>
		<wfw:commentRss>http://www.deepseath.com/?feed=rss2&#038;p=660</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
