is a text and <a href="http://www.google.com">This_is_a_link</a>之后,调用document.getSelection().getRangeAt查看这个jsfiddle (双击"This_is_a_link“,就会有一个带有startContainer的控制台日志):$(function(){
$('a'dblclic
有一个HTML页面和一个js文件。<p>//text.jsvar selection= window.getSelection().getRangeAt(0);} var selection= window.getSelection().getRangeAt(0);
varI just find the fol
window.getSelection(); //user selection will be a Selection-Object(NS_ERROR_ILLEGAL_VALUE) [nsISelection.getRangeAt]" nsresult: "0x80070057
(NS_ERROR_ILLEGAL_VALUE)&qu