--- title: Console.dirxml() slug: Web/API/Console/dirxml translation_of: Web/API/Console/dirxml --- <div>{{APIRef("Console API")}}{{Non-standard_header}}</div> <p>显示一个明确的XML/HTML元素的包括所有后代元素的交互树。 如果无法作为一个element被显示,那么会以JavaScript对象的形式作为替代。 它的输出是一个继承的扩展的节点列表,可以让你看到子节点的内容。</p> <h2 id="语法">语法</h2> <pre class="syntaxbox">console.dirxml(<em>object</em>); </pre> <h2 id="参数">参数</h2> <dl> <dt><code>object</code></dt> <dd>一个属性将被输出的JavaScript对象。</dd> </dl> <h2 id="浏览器兼容性">浏览器兼容性</h2> <p>{{CompatibilityTable}}</p> <div id="compat-desktop"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Edge</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Basic support</td> <td>{{CompatVersionUnknown}}</td> <td>{{CompatVersionUnknown}}</td> <td>{{CompatVersionUnknown}}</td> <td>{{CompatVersionUnknown}}</td> <td>{{CompatVersionUnknown}}</td> <td>{{CompatUnknown}}</td> </tr> <tr> <td>Available in workers</td> <td>{{CompatUnknown}}</td> <td>{{CompatVersionUnknown}}</td> <td>{{CompatUnknown}}</td> <td>{{CompatUnknown}}</td> <td>{{CompatUnknown}}</td> <td>{{CompatUnknown}}</td> </tr> </tbody> </table> </div> <div id="compat-mobile"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Edge</th> <th>Firefox Mobile (Gecko)</th> <th>IE Mobile</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{CompatUnknown}}</td> <td>{{CompatVersionUnknown}}</td> <td>{{CompatNo}}</td> <td>{{CompatUnknown}}</td> <td>{{CompatUnknown}}</td> <td>{{CompatUnknown}}</td> </tr> <tr> <td>Available in workers</td> <td>{{CompatUnknown}}</td> <td>{{CompatVersionUnknown}}</td> <td>{{CompatNo}}</td> <td>{{CompatUnknown}}</td> <td>{{CompatUnknown}}</td> <td>{{CompatUnknown}}</td> </tr> </tbody> </table> </div> <h2 id="相关链接">相关链接</h2> <ul> <li><a class="external" href="http://www.opera.com/dragonfly/documentation/console/">Opera Dragonfly documentation: Console</a></li> </ul>