JavaScript通过ID获取元素坐标 function getElementPos(elementId) { var ua = navigator.userAgent.toLowerCase(); var isOpera = (ua.indexOf('opera') != -1); var isIE = (ua.indexOf('msie') != -1 && !isOpera); // not opera spoof var el = document.get…
javascript——处理(获取)浏览器版本.操作系统 /** * Created by Administrator on 15-1-12. */ function BroswerUtil() { } BroswerUtil = { //检测浏览器版本 getBrowserVersion: function () { var agent = navigator.userAgent.toLowerCase(); var arr = []; var Browser = ""; var B…