如何使用javascript获取chrome中的gmail组合窗口的innertext

问题描述:

如何使用javascript

How to get the inner text of body of compose window of gmail in chrome using javascript

轻松获取Chrome中撰写gmail窗口的主体内部文本。



当你打开gmail撰写窗口时,在(浏览器的javascript)控制台中输入:

Easy.

Enter this into the (browser's javascript) console when you have the gmail compose window open:
document.getElementById(':ma').innerHTML





您可以通过右键单击该区域并选择Inspect Element来自行查找。这会显示元素的html。你只需要使用相关的javascript来操作它。



You can find this out for yourself by right-clicking the area and selecting Inspect Element. That shows you the html for the element. You just have to use the relevant javascript to manipulate it.