JS清除DIV的选中状态

var clearSlct = "getSelection" in window ? function () {

    window.getSelection().removeAllRanges();

} : function () {

    document.selection.empty();

};
原文地址:https://www.cnblogs.com/xdoudou/p/3198137.html