【发布时间】:2021-01-10 05:33:19
【问题描述】:
我正在查看 html 参考页面,他们在其中放置了有关 HTML 标记的所有描述。它说“标签指定了独立的内容,如插图、图表、照片、代码列表等。”我不明白什么是代码清单。它实际上是指该定义中的代码列表吗?
【问题讨论】:
我正在查看 html 参考页面,他们在其中放置了有关 HTML 标记的所有描述。它说“标签指定了独立的内容,如插图、图表、照片、代码列表等。”我不明白什么是代码清单。它实际上是指该定义中的代码列表吗?
【问题讨论】:
表示在页面上列出类似的代码
<figure>
<figcaption>Get browser details using <code>navigator</code>.</figcaption>
<pre>
function NavigatorExample() {
var txt;
txt = "Browser CodeName: " + navigator.appCodeName + "; ";
txt+= "Browser Name: " + navigator.appName + "; ";
txt+= "Browser Version: " + navigator.appVersion + "; ";
txt+= "Cookies Enabled: " + navigator.cookieEnabled + "; ";
txt+= "Platform: " + navigator.platform + "; ";
txt+= "User-agent header: " + navigator.userAgent + "; ";
console.log("NavigatorExample", txt);
}
</pre>
</figure>
【讨论】: