我想将元素放在选定文本上方.但我无法弄清楚坐标.
var sel = document.getSelection(); if(sel != null) { positionDiv(); }
示例:(图片)
alt text http://www.freeimagehosting.net/uploads/bf4035f29f.png
javascript getselection
getselection ×1
javascript ×1