<html>
<link rel="stylesheet" href="josh.css">
<body bgcolor="#FFFFFF">

		<div id="">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">AttrAattribute</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span>  IE <span class="emphasis">5</span>  DOM <span class="emphasis">1</span></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements"></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description"><p>vf̑́uO/lṽyA𒊏ۓIɕ\IuWFNǵAW3C DOM ̗pł <span class="literal">Attr</span> IuWFNgAIE ł <span class="literal">attribute</span> IuWFNgƌĂ΂Ă܂B͖͈̂Ⴂ܂AIuWFNgwĂ܂BIuWFNg͂ǂ̊łA<span class="literal">document.createAttribute()</span> \bhč쐬܂B̏ꍇAIuWFNgւ̎QƂ́Avf <span class="literal">setAttributeNode()</span> \bhĂ̑IuWFNgvfɑ}ۂ̃p[^ɂȂ܂Bɗ܂B
</p>
<span class="PROGRAMLISTING"><pre>var newAttr = document.createAttribute(&quot;author&quot;);
newAttr.value = &quot;William Shakespeare&quot;;
document.getElementById(&quot;hamlet&quot;).setAttributeNode(newAttr);</pre></span>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="2"><p><span class="literal">getAttributeNode()</span> \bhn߁AW3C  DOM vf̃\bh̒ɂ͑IuWFNgԂ̂ÁAXNvg\ȃIuWFNgƓlɁAANZX\ȃvpeBLĂ܂B
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="2"><p>W3C DOM ̒ۃfŒ`Ă <span class="literal">Attr</span> IuWFNg <span class="literal">Node</span> IuWFNĝׂẴvpeBƃ\bhp܂BWindows  IE ͊Ƀo[W 5 ŗvfƃeLXgm[hɑΉĂ܂Ao[W 6 ܂ł́A<span class="literal">attribute</span> IuWFNg͈ꕔ <span class="literal">Node</span> IuWFNgvpeBpĂ܂łB
</p>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="htmlequivalent"><span class="title"> HTML R[h</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>Jn^ÔׂẮuO/lṽyAB</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectmodelreference"><span class="title">IuWFNgQ</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>[window.]document.getElementById("<span class="replaceable">elementID</span>").attributes[<span class="replaceable">i</span>]
[window.]document.getElementById("<span class="replaceable">elementID</span>").attributes.item(<span class="replaceable">i</span>)
[window.]document.getElementById("<span class="replaceable">elementID</span>").attributes.getNamedItem[<span class="replaceable">attrName</span>]</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificproperties"><span class="title">IuWFNgŗL̃vpeB</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<table border="1"><tbody><tr><td><span class="literal">expando</span></td><td><span class="literal">name</span></td><td><span class="literal">ownerElement</span></td><td><span class="literal">specified</span></td><td><span class="literal">value</span></td>
								</tr>
							</tbody></table>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificmethods"><span class="title">IuWFNgŗL̃\bh</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>Ȃ</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificeventhandlerproperties"><span class="title">IuWFNgŗL̃Cxgnh[vpeB</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>Ȃ</p>
					</td>
				</tr>
			</table>
		</div><div id="expando">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">expando</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">Ȃ</span>  IE <span class="emphasis">6</span>  DOM <span class="emphasis">Ȃ</span></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">ǂݎp</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description"><p>vfɑ}ꂽA̗vf̃lCeBułȂꍇɁA<span class="literal">true</span> ̃u[lԂ܂B<span class="literal">document.createAttribute()</span> ō쐬ꂽɂẮA<span class="literal">setAttributeNode()</span> \bhėvfɑǉ܂ł̊ԁÃvpeB̒l <span class="literal">false</span> ƂȂ܂B̍ہAvpeB̒l͗vf̃lCeBũReLXgōĕ]s܂B
</p>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title"></span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var isCustomAttr =
  document.getElementById("book3928").getAttributeNode("author").expando;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">l</span></td>
				</tr>
				<tr>
					<td colspan="2"><p><span class="literal">true</span> ܂ <span class="literal">false</span> ̃u[l</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">l</span></td>
				</tr>
				<tr>
					<td colspan="2"><p><span class="literal">false</span></p>
					</td>
				</tr>
			</table>
		</div><div id="name">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">name</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span>  IE <span class="emphasis">5</span>  DOM <span class="emphasis">1</span></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">ǂݎp</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description"><p>́uO/lṽyÁuOv̕łB<span class="literal">Attr</span> m[h <span class="literal">nodeName</span> vpeBƓłB̖OXNvgŕύX邱Ƃ͂ł܂Bˑ֌WɂhLgc[ɍ\邽߂łBOύXꍇ́AVɑ쐬ĈȑȎƒu܂B̖̑O <span class="literal">document.createAttribute()</span> \bh̕K&#123;p[^ɂȂ܂B
</p>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title"></span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>if (myAttr.name == "author") {
    // process author attribute
}</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">l</span></td>
				</tr>
				<tr>
					<td colspan="2"><p></p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">l</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>̕BAVɑ쐬ꍇɂ͖OKvłB</p>
					</td>
				</tr>
			</table>
		</div><div id="ownerElement">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">ownerElement</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span>  IE <span class="emphasis">Ȃ</span>  DOM <span class="emphasis">2</span></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">ǂݎp</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description"><p>݂̑IuWFNg܂ޗvfւ̎QƂԂ܂BVɍ쐬vfɑ}܂ł́ÃvpeB <span class="literal">null</span> ƂȂ܂B
</p>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title"></span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>if (myAttr.ownerElement.tagName == "fred") {
    // process attribute of &lt;fred&gt; element
}</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">l</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>vfm[hւ̎Q</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">l</span></td>
				</tr>
				<tr>
					<td colspan="2"><p><span class="literal">null</span></p>
					</td>
				</tr>
			</table>
		</div><div id="specified">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">specified</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span>  IE <span class="emphasis">5</span>  DOM <span class="emphasis">1</span></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">ǂݎp</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description"><p>̒l\[XR[hŖIɐݒ肳Ăꍇ܂̓XNvgŒĂꍇɁA<span class="literal">true</span> ̃u[lԂ܂BIɐݒ肳ĂȂuEUɔfĂꍇ (IE ɊY) ɂ́ȂhLg DTD Œ`ĂlƂ蓾ꍇłĂAl <span class="literal">specified</span> vpeB <span class="literal">false</span> ƂȂ܂BW3C DOM Level 2 ł́AVɍ쐬 <span class="literal">Attr</span> IuWFNg <span class="literal">specified</span> vpeB <span class="literal">true</span> łȂ΂ȂȂƒ`Ă܂AIE 6  Netscape 6.2 ȍ~̃uEU͂Avfɑ}܂ŁÃvpeB <span class="literal">false</span> ̂܂܂ƂȂ܂B
</p>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title"></span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>if (myAttr.specified) {
    // process attribute whose value is something other than DTD default
}</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">l</span></td>
				</tr>
				<tr>
					<td colspan="2"><p><span class="literal">true</span> ܂ <span class="literal">false</span> ̃u[l</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">l</span></td>
				</tr>
				<tr>
					<td colspan="2"><p><span class="literal">false</span></p>
					</td>
				</tr>
			</table>
		</div><div id="value">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">value</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">6</span> DOM <span class="emphasis">1</span></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">ǂݏ</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description"><p>́uO/lṽyÁulv̕܂B<span class="literal">Attr</span> m[h <span class="literal">nodeValue</span> vpeBƓłB܂Avf <span class="literal">getAttribute()</span> \bh <span class="literal">setAttribute()</span> \bhāA蒼ړIɃANZX\łBVɑIuWFNg쐬ꍇɂ́Avfɑ}OɁA<span class="literal">value</span> vpeBŒlݒ肷邱Ƃł܂BIE ̏ꍇ܂߁Am[h̒l͏ɕłBAΉvpeBł́Al܂̓u[l̃f[^^Cvgpł܂B
</p>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title"></span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>document.getElementById("hamlet").getAttributeNode("author").value = "Shakespeare";</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">l</span></td>
				</tr>
				<tr>
					<td colspan="2"><p></p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">l</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>̕BAWindows  IE ͕ <span class="literal">undefined</span> (܂ <span class="literal">undefined</span> lɂȂȂ^Cv̒l) Ԃ܂B
</p>
					</td>
				</tr>
			</table>
		</div>

</body>
</html>
