HTML
HTML <figure> 元素
使用 <figure> 展示一段代码
源代码:
点击运行 »
<figure> <figcaption>通过 navigator 获取浏览器详情</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; } </pre> </figure>
运行结果:
点击运行 »