摘要: /* APP Common Begin*/try{ document.domain = "qq.com";}catch (e){}if (typeof AppTui == "undefined"){ var AppTui = new Object();}AppTui.$ = function(s){ return (typeof s == "object") ? s: document.getElementById(s);};AppTui.Cookie = { getCookie: function(name) { var arr = 阅读全文
posted @ 2011-12-11 16:32 袁晓平 阅读(442) 评论(0) 推荐(0) 编辑
摘要: AppTui.Element = { getElementLeft: function(e) { return (e==null) ? 0 : (AppTui.$(e).offsetLeft + AppTui.Element.getElementLeft(AppTui.$(e).offsetParent)); }, getElementTop: function(e) { return (e==null) ? 0 : (AppTui.$(e).offsetTop + AppTui.Element.getElementTop(AppTui.$(e).offsetParent)); }, ... 阅读全文
posted @ 2011-12-11 16:30 袁晓平 阅读(159) 评论(0) 推荐(0) 编辑
摘要: function JsLoad(sUrl ,options){ options = options || {}; if(!options.sId) options.sId = 'jsload_'+Math.random(); if(!options.varname) options.varname = 'datav4'; var sId = 'jsload_'+options.sId; if(AppTui.$(sId)!='undefined'&&AppTui.$(sId)!=null){ AppTui.$(sId 阅读全文
posted @ 2011-12-11 16:28 袁晓平 阅读(186) 评论(0) 推荐(0) 编辑
摘要: AppTui.HashTable = function(){ this.__construct();};AppTui.HashTable.prototype = { __construct: function() { this._hash = new Object(); }, set: function(key, value, rewrite) { if (rewrite !== false) { this._hash[key] = value; } else if (this.get(key) != null) { this._hash[key] = value; } ... 阅读全文
posted @ 2011-12-11 16:23 袁晓平 阅读(199) 评论(0) 推荐(0) 编辑
摘要: AppTui.Cookie = { getCookie: function(name) { var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); if (arr != null) { return window.unescape(arr[2]); } return null; }, setCookie:function(name,value,expires,path,domain,secure){ var expDays = expires*24*60*60* 阅读全文
posted @ 2011-12-11 16:22 袁晓平 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 获取页面宽度 page_widthdocument.body.scrollWidth || document.documentElement.scrollWidth || 0;获得页面高度page_heightdocument.body.scrollHeight || document.documentElement.scrollHeight || 0;获取页面body宽度body_width document.body.clientWidth || document.documentElement.clientWidth || 0;获取页面body高度body_topwindow.pageY 阅读全文
posted @ 2011-12-11 16:18 袁晓平 阅读(211) 评论(0) 推荐(0) 编辑
摘要: function getPostionByDom(element) { var el; var ua = navigator.userAgent.toLowerCase(); var isOpera = (ua.indexOf('opera') != -1); var isIE = (ua.indexOf('msie') != -1 && !isOpera); // not opera spoof if (typeof element == 'object'){ el = element; } else{ el = documen 阅读全文
posted @ 2011-12-11 15:28 袁晓平 阅读(213) 评论(0) 推荐(0) 编辑
摘要: var QVPL= {};var pl = navigator.platform.toLowerCase(); var ipad = pl.match(/ipad/); if (ipad) { QVPL._clientPlatform = "ipad"; return true; } var iphone = pl.match(/iphone/);if (iphone) { QVPL._clientPlatform = "iphone"; return true; } var ipod = pl.match(/ipod/); ... 阅读全文
posted @ 2011-12-11 14:28 袁晓平 阅读(1146) 评论(0) 推荐(0) 编辑