html- <pre> &<code&

2016-12-12  本文已影响72人  baiying

用途:

<code>:

代码

<code>
    document.getELementById("id1");
    document.getELementById("id2");
    document.getELementById("id3");
</code>
<br>
document.getELementById("id4");
运行结果

<pre>:

代码

<pre>
    &lt;html&gt;
    &lt;head&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;loadxmldoc.js&quot;&gt;
    &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
    xmlDoc=&lt;<font color="blue">a&nbsp;href="dom_loadxmldoc.asp"&gt;loadXMLDoc&lt;/a&gt;</font>(&quot;books.xml&quot;);
    document.write(&quot;xmlDoc is loaded, ready for use&quot;);
    &lt;/script&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</pre>
运行效果

区别与联系:

上一篇下一篇

猜你喜欢

热点阅读