如何關閉 HTML 表單元素中的拼寫檢查(語法更正)?


要關閉表單元素的拼寫檢查,程式碼如下 −

示例

 即時演示

<!DOCTYPE html>
<html>
<head>
<h1>Disabling Spellcheck Example</h1>
<form>
<p>Your Name:</p>
<input type="text" name="fname" spellcheck="false">
<p>About Yourself</p>
<textarea name="about you" spellcheck="true"></textarea><br>
<input type="submit">
</form>
<h2>Type wrong spelling in the above input field to see spellcheck in action</h2>
</body>
</html>

輸出

上述程式碼將產生以下輸出 −

在輸入欄位中輸入內容 −

更新日期:2020 年 5 月 6 日

121 人檢視

開啟你的 職業生涯

透過完成課程獲得認證

開始學習
廣告
© . All rights reserved.