首頁  >  文章  >  web前端  >  如何在HTML中新增拼字檢查器?

如何在HTML中新增拼字檢查器?

WBOY
WBOY轉載
2023-09-06 21:45:09863瀏覽

如何在HTML中新增拼字檢查器?

要新增拼字檢查器,請使用 HTML 中的 spellcheck 屬性。此屬性檢查輸入元素、

注意 - 它適用於輸入元素,但不適用於密碼。

範例

您可以嘗試執行以下程式碼在 HTML 中新增拼字檢查器 -

<!DOCTYPE html>
<html>
   <body>
      Subject: <input type="text" name="sub" spellcheck="true">
      <p>Add an incorrect spelling for a word above and see what happens.</p>
      <p contenteditable="true" spellcheck="true">This is an editable conttent, with a spelling mistake. Click to edit.</p>
   </body>
</html>

以上是如何在HTML中新增拼字檢查器?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:tutorialspoint.com。如有侵權,請聯絡admin@php.cn刪除