如何访问JavaScript中的Chrome拼写检查建议 [英] How to access Chrome spell-check suggestions in JavaScript

查看:190
本文介绍了如何访问JavaScript中的Chrome拼写检查建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在JavaScript中检测textarea中的拼写错误?有没有与此相关的事件?如何访问Chrome拼写检查拼写检查建议?

Chrome的拼写检查建议拼写错误的单词?


据我所知,你不能。为了更全面地回答,我还会提及相关问题:




是否有与此相关的事件?

不, contextmenu 事件为此提供了任何有用的信息目的:它没有拼写检查信息,也不能读取上下文菜单项目列表(可能包含拼写建议)。 更改 事件也不提供拼写检查信息。


如何在JavaScript中检测textarea内的拼写错误?


您可以自己编写代码或使用第三方库。还有关于这个主题的其他堆栈溢出问题,或者你可以自己搜索。相关堆栈溢出问题包括:


How does one detect a spelling mistake inside a textarea in JavaScript? Is there an event associated with this? How do I access Chrome's spell-check suggestions for a misspelled word?

解决方案

How do I access Chrome's spell-check suggestions for a misspelled word?

To the best of my knowledge, you cannot. To answer more fully, I'll also mention related issues:

Is there an event associated with this?

No, nor does the contextmenu event provide anything useful for this purpose: it has no spell-check information and you cannot read the list of context menu items (which may contain spelling suggestions). The change event also doesn't provide spell-check information.

How does one detect a spelling mistake inside a textarea in JavaScript?

You can either code this yourself or use a third party library. There are other Stack Overflow questions on this topic or you can search for yourself. Related Stack Overflow questions include:

这篇关于如何访问JavaScript中的Chrome拼写检查建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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