📄 dom_comment.asp@output=print
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XML DOM - Comment object</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
<h1>XML DOM - The Comment Object</h1>
<a href="dom_cdatasection.asp"><img border="0" src="../images/btn_previous.gif" alt="prev" width="100" height="20" /></a>
<a href="dom_http.asp"><img border="0" src="../images/btn_next.gif" alt="next" width="100" height="20" /></a>
<hr />
<p class="intro">The Comment object represents the content of comment nodes in a
document.</p>
<hr />
<h2>Examples</h2>
<p>The examples below use the XML file
<a target="_blank" href="books.xml">books.xml</a>. <br />
An <a href="dom_loadxmldoc.asp">external JavaScript</a> is used to load the XML file.</p>
<p><a target="_blank" href="tryit.asp@filename=try_dom_createcomment">createComment() - Create a comment node</a></p>
<hr />
<h2>The Comment object</h2>
<p>The Comment object represents the content of comment nodes in a document.</p>
<p>
<b>IE:</b> Internet Explorer, <b>F:</b> Firefox, <b>O:</b> Opera, <b>W3C:</b>
World Wide Web Consortium (Internet Standard)</p>
<h3>Comment Object Properties</h3>
<table border="1" width="100%" class="ex" cellspacing="0" id="table11">
<tr>
<th width="25%" align="left" valign="top">Property</th>
<th width="55%" align="left" valign="top">Description</th>
<th width="5%" align="left" valign="top">IE</th>
<th width="4%" align="left" valign="top">F</th>
<th width="4%" align="left" valign="top">O</th>
<th width="7%" align="left" valign="top">W3C</th>
</tr>
<tr>
<td valign="top"><a href="prop_comment_data.asp">data</a></td>
<td valign="top">Sets or returns the text of this node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="prop_comment_length.asp">length</a></td>
<td valign="top">Returns the length of the text of this node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
</table>
<h3>Comment Object Methods</h3>
<table border="1" width="100%" class="ex" cellspacing="0" id="table12">
<tr>
<th width="45%" align="left" valign="top">Method</th>
<th width="35%" align="left" valign="top">Description</th>
<th width="5%" align="left" valign="top">IE </th>
<th width="4%" align="left" valign="top">F</th>
<th width="4%" align="left" valign="top">O</th>
<th width="7%" align="left" valign="top">W3C</th>
</tr>
<tr>
<td valign="top"><a href="met_comment_appenddata.asp">appendData()</a></td>
<td valign="top">Appends data to the node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_comment_deletedata.asp">deleteData()</a></td>
<td valign="top">Deletes data from the node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_comment_insertdata.asp">insertData()</a></td>
<td valign="top">Inserts data into the node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_comment_replacedata.asp">replaceData()</a></td>
<td valign="top">Replaces data in the node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_comment_substringdata.asp">substringData()</a></td>
<td valign="top">Extracts data from the node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
</table>
<br />
<hr />
<a href="dom_cdatasection.asp"><img border="0" src="../images/btn_previous.gif" alt="prev" width="100" height="20" /></a>
<a href="dom_http.asp"><img border="0" src="../images/btn_next.gif" alt="next" width="100" height="20" /></a>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -