aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/tools/web_console/rich_output
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:43:23 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:43:23 -0500
commit218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (patch)
treea9ef8ac1e1b8fe4207b6d64d3841bfb8990b6fd0 /files/zh-tw/tools/web_console/rich_output
parent074785cea106179cb3305637055ab0a009ca74f2 (diff)
downloadtranslated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.gz
translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.bz2
translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.zip
initial commit
Diffstat (limited to 'files/zh-tw/tools/web_console/rich_output')
-rw-r--r--files/zh-tw/tools/web_console/rich_output/index.html75
1 files changed, 75 insertions, 0 deletions
diff --git a/files/zh-tw/tools/web_console/rich_output/index.html b/files/zh-tw/tools/web_console/rich_output/index.html
new file mode 100644
index 0000000000..d09757cfa2
--- /dev/null
+++ b/files/zh-tw/tools/web_console/rich_output/index.html
@@ -0,0 +1,75 @@
+---
+title: 豐富的輸出對象
+slug: Tools/Web_Console/Rich_output
+translation_of: Tools/Web_Console/Rich_output
+---
+<p>當網路主控台印出物件時,它不但會顯示物件名、還會包括該物件資訊的 richer set。尤其是它要:</p>
+
+<ul>
+ <li><a href="/zh-TW/docs/Tools/Web_Console/Rich_output#Type-specific_rich_output">提供某些類型的額外資訊</a></li>
+ <li><a href="/zh-TW/docs/Tools/Web_Console/Rich_output#Examining_object_properties">開啟物件屬性的詳細檢查</a></li>
+ <li><a href="/zh-TW/docs/Tools/Web_Console/Rich_output#Highlighting_and_inspecting_DOM_nodes">為 DOM 元素提供 richer information,並讓你能在檢查中選擇。</a></li>
+</ul>
+
+<h2 id="特定類型的_rich_output">特定類型的 rich output</h2>
+
+<p>網路主控台給許多物件類型提供了 rich output,包括:</p>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <td><code>Object</code></td>
+ <td><img alt="" src="https://mdn.mozillademos.org/files/9597/web-console-object.png" style="display: block; height: 39px; margin-left: auto; margin-right: auto; width: 600px;"></td>
+ </tr>
+ <tr>
+ <td><code>Array</code></td>
+ <td><img alt="" src="https://mdn.mozillademos.org/files/9589/web-console-array.png" style="display: block; height: 38px; margin-left: auto; margin-right: auto; width: 600px;"></td>
+ </tr>
+ <tr>
+ <td><code>Date</code></td>
+ <td><img alt="" src="https://mdn.mozillademos.org/files/9591/web-console-date.png" style="display: block; height: 39px; margin-left: auto; margin-right: auto; width: 600px;"></td>
+ </tr>
+ <tr>
+ <td><code>Promise</code></td>
+ <td>
+ <div class="geckoVersionNote">
+ <p>New in Firefox 36</p>
+ </div>
+ <p><img alt="" src="https://mdn.mozillademos.org/files/9599/web-console-promise.png" style="display: block; height: 76px; margin-left: auto; margin-right: auto; width: 600px;"></p>
+ </td>
+ </tr>
+ <tr>
+ <td><code>RegExp</code></td>
+ <td><img alt="" src="https://mdn.mozillademos.org/files/9601/web-console-regexp.png" style="display: block; height: 39px; margin-left: auto; margin-right: auto; width: 600px;"></td>
+ </tr>
+ <tr>
+ <td><code>Window</code></td>
+ <td><img alt="" src="https://mdn.mozillademos.org/files/9603/web-console-window.png" style="display: block; height: 38px; margin-left: auto; margin-right: auto; width: 600px;"></td>
+ </tr>
+ <tr>
+ <td><code>Document</code></td>
+ <td><img alt="" src="https://mdn.mozillademos.org/files/9593/web-console-document.png" style="display: block; height: 39px; margin-left: auto; margin-right: auto; width: 600px;"></td>
+ </tr>
+ <tr>
+ <td><code>Element</code></td>
+ <td><img alt="" src="https://mdn.mozillademos.org/files/9595/web-console-element.png" style="display: block; height: 39px; margin-left: auto; margin-right: auto; width: 600px;"></td>
+ </tr>
+ <tr>
+ <td><code>Event</code></td>
+ <td><img alt="" src="https://mdn.mozillademos.org/files/14434/webconsole-events.png" style="height: 51px; width: 600px;"></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="檢查物件屬性">檢查物件屬性</h2>
+
+<p>當控制台印出一個物件的時候,它會以斜體的樣式呈現。點擊它,你會看到一個有該物件詳細資訊的面板:
+</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/7381/commandline-inspecting.png" style="display: block; margin-left: auto; margin-right: auto;">要關閉此面板請按 <kbd>Esc</kbd> 鍵...</p>
+
+<h2 id="高亮顯示與_DOM_節點檢查">高亮顯示與 DOM 節點檢查</h2>
+
+<p>若你在控制台印出的 DOM 元素上懸停游標,頁面會高亮該元素:</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/7379/commandline-highlightnode.png" style="display: block; margin-left: auto; margin-right: auto;">In the screenshot above you'll also see a blue "target" icon next to the node in the console output: click it to switch to the <a href="https://developer.mozilla.org/zh-TW/docs/Tools/Page_Inspector">Inspector</a> with that node selected.</p>