js 选择指定区域
/根据id 选择特定区域
function SelectRange(id) {
var div = document.getElementById(id);
var controlRange;
if (document.body.createControlRange) {
controlRange = document.body.createControlRange();
controlRange.addElement(div);
controlRange.execCommand('SelectAll');
}
else if (window.getSelection) {//标准浏览器
var sel = window.getSelection();
sel.selectAllChildren(div)
}
}