如何獲取與 HTML 中 http-equiv 或 name 屬性關聯的值?


使用 HTML 中的 content 屬性獲取與 http-equiv 或 name 屬性相關的值。

示例

可以嘗試執行以下程式碼來實現 content 屬性 −

<!DOCTYPE html>
<html>
   <head>
      <meta name = "description" content = "Learning content and videos">
   </head>
   <body>

      <p>This is demo text.</p>

   </body>
</html>

更新於: 2020 年 3 月 3 日

109 次瀏覽

開啟您的職業生涯

完成課程以獲得認證

開始
廣告
© . All rights reserved.