Javascript访问浏览器上的拼写检查程序 [英] Javascript access to spell checker on browsers

查看:364
本文介绍了Javascript访问浏览器上的拼写检查程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以访问Javascript文本区域浏览器中包含的拼写检查程序?我希望能够通过我的代码来控制拼写检查。大多数浏览器(除IE之外)现在似乎都内置了一些拼写检查器。

Is it possible to get access to the spell checker that is incorporated in browsers for text areas from Javascript? I would like to be able to control spell checking from withing my code. Most browsers (apart from IE) seem to have some kind of a spell checker built in to them nowadays.

推荐答案

访问最多我知道在字段上禁用或启用拼写检查:内联禁用Firefox拼写检查?

The most access that I know of is disabling or enabling spellchecking on a field: Inline Disabling of Firefox Spellcheck?

我不知道你可以通过javascript直接访问浏览器的拼写检查器。如果您不熟悉浏览器的拼写检查程序,则有许多用于javascript的开源拼写检查程序。只需尝试谷歌搜索javascript拼写检查。

I don't know of a way that you can directly access the spellchecker of a browser via javascript. If you aren't particular to the spell checker of the browser, there are many open source spell checkers for javascript. Just try googling javascript spell checker.

如果你真的想使用浏览器拼写检查,你可能想要创建一个文本框并将显示设置为无。然后,您可以将每个单词放在文本框中,然后检查它是否加下划线。我不确定这是否可行,只是一个想法。我的建议是使用javascript拼写检查器,而不是试图破解使用浏览器的拼写检查器的方法。

If you really want to use the browsers spellcheck you might want to create a textbox and set the display to none. You could then put each word in the textbox and then check to see if it's underlined or not. I'm not sure of the feasability of this, just a thought. My suggestion would be to use a javascript spellchecker instead of trying to hack up a way of using the browser's spellchecker.

这篇关于Javascript访问浏览器上的拼写检查程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆