html5的spellcheck属性来进行拼写文法检查

2021-03-17 09:40:21
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>spellcheck属性的使用</title>
</head>
<body>
<style>
.ac{border:1px solid #ff7300;width:200px;height:100px;}
</style>
<pre>
1.<b>输入完某个单词后,进行按空格键,就可以看到这是不是错误的单词了。</b>
2.spellcheck="true"、'false'、"",值为true和""时,代表检查。。
【空字符串为什么检查:就跟input其他属性一样,你设置个readonly就是只读( readonly=""),再加个值描述的更准确。】
3.使用场合:
   1.类型为text型的input元素,但input类型为text型的input元素,但input="password"不行(原因:你是密码哎,都是星号还检查个啥玩意,密码本身就是不同字母组合而出的)。
   2.textarea元素
   3.spellcheck属性,html5中的所有元素都可以指定,对于不是输入栏的元素,须指定contenteditable="true" 编辑属性,才能使用。(如div什么的。)
4.现代浏览器都支持以及IE10  
</pre>
 
<p>检测<textarea spellcheck="true" >absolute testK</textarea> </p>
<p>不检测 <textarea spellcheck="false"></textarea> </p>
<div contenteditable="true" spellcheck class="ac">div absolute testK</div>
<p>readonly="":<input readonly=""/></p>
<p><input type="password" spellcheck="true"/></p>
</body>
</html>


  • 2018-01-18 17:41:05

    Fatal error: Class 'Memcached' not found

    从别地方复制来了新的配置文件,包了这样的错误,因为我也是刚刚安装了php7,以为是php的问题,于是就根据网上的提示,安装memcached.dll包。

  • 2018-01-20 20:33:58

    PHP中session_cache_limiter() 是什么意思啊

    session_cache_limiter('public'); session_cache_expire(30); session_start();第三个我晓得 前两个 网络上没找着资料 手册上全是英文的 翻译后 还是看不懂主要是没翻译正确