4

我在 Windows Vista 上使用 FF 3.5.3。

这是我的(为简短而编辑)书签:

javascript:(function(){
var text = window.content.getSelection().toString();
alert(text);
})();

有效,但不在 gmail.com 上。可能是由于动态生成的内容。

我知道这种解决方法,但它仅适用于 Firefox 扩展。

4

1 回答 1

6

Gmail 使用框架。尝试:

document.getElementById('canvas_frame').contentWindow.getSelection().toString();
于 2009-10-15T15:17:19.907 回答