开发者

Textarea spellcheck attribute XHTML Strict

I would like to turn off the built-in spellcheck functionality in certain browsers such as Firefox and Opera on a textarea that contains HTML embed code f开发者_开发百科or visitors to copy and paste. This can be done with following attribute:

spellcheck="false"

However, this causes a validation error for XHTML Strict. Also, it doesn't work properly in Opera, because the spell checking returns after a user selects the embed code in the text area. Is there another method for turning off spell check functionality?


spellcheck="false" is a part of HTML5 specification. Don't you mind changing your doctype in appropriate way?

Another idea proposed in this question is using third-party WYSIWYG editors that don't use textfield for user input.


 $("#id").attr("spellcheck",false);
 $("#id").attr("spellcheck",true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜