
<?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; prototype</title>
	<atom:link href="http://blog.devilab.net/archives/tag/prototype/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.devilab.net</link>
	<description>システム・プログラム関連のメモや最新技術についてのメモを掲載</description>
	<lastBuildDate>Tue, 20 Jul 2010 03:14:47 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>エレメント属性を設定／prototypeメモ</title>
		<link>http://blog.devilab.net/archives/252</link>
		<comments>http://blog.devilab.net/archives/252#comments</comments>
		<pubDate>Wed, 06 Jan 2010 12:01:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://blog.devilab.net/?p=252</guid>
		<description><![CDATA[○JavaScriptの部分 function testFnc(){ //prototypeを使わない場合： var imgTag = document.getElementById(&#34;sample&#34;); imgTag.setAttribute(&#34;src&#34;, &#34;sample2.jpg&#34;); //prototypeを使う場合： $(&#34;sample&#34;).setAttribute(&#34;src&#34;, &#34;sample2.jpg&#34;); } ○HTMLの部分 &#60;img src=&#34;sample1.jpg&#34; id=&#34;sample&#34; /&#62; prototypeを使うと上記のように省略して書くことが出来る。]]></description>
			<content:encoded><![CDATA[<p>○JavaScriptの部分</p>
<pre class="brush: jscript;">
function testFnc(){

	//prototypeを使わない場合：
	var imgTag = document.getElementById(&quot;sample&quot;);
	imgTag.setAttribute(&quot;src&quot;, &quot;sample2.jpg&quot;);

	//prototypeを使う場合：
	$(&quot;sample&quot;).setAttribute(&quot;src&quot;, &quot;sample2.jpg&quot;);
}
</pre>
<p>○HTMLの部分</p>
<pre class="brush: xml;">
&lt;img src=&quot;sample1.jpg&quot; id=&quot;sample&quot; /&gt;
</pre>
<p>prototypeを使うと上記のように省略して書くことが出来る。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.devilab.net/archives/252/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
