弹出框

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>AlertBox 弹出层(信息提示框)效果</title>
<script src="CJL.0.1.min.js"></script>
<script src="AlertBox.js"></script>
</head>
<body style="width:900px; height:1000px; padding:100px;"><style>
.lightbox{width:300px;background:#FFFFFF;border:5px solid #ccc;line-height:20px;display:none; margin:0;}
.lightbox dt{background:#f4f4f4;padding:5px;}
.lightbox dd{ padding:20px; margin:0;}
</style>
<input type="button" value="锁定屏幕" id="idOverlay" />
<input type="button" value="定位效果" id="idFixed" />
<input type="button" value="居中效果" id="idCenter" />
<select><option>覆盖select测试</option>
</select>
<input type="button" value=" 打开 " id="idBoxOpen" />
<span id="idMsg"></span> <br />
<dl id="idBox" class="lightbox" style="top:10%;left:5%;"><dt><b>AlertBox</b> </dt><dd><input type="text" value="正常输入" id="idBoxTxt"><input type="button" value=" 关闭 " id="idBoxClose" /></dd>
</dl>
<script>
(function(){var ab = new AlertBox("idBox"), lock = false;//锁定键盘
function lockup(e){ e.preventDefault(); }
//高亮层不锁定
function lockout(e){ e.stopPropagation(); }ab.onShow = function(){$$("idBoxTxt").select();if ( lock ) {$$E.addEvent( document, "keydown", lockup );$$E.addEvent( this.box, "keydown", lockout );OverLay.show();}
}
ab.onClose = function(){$$("idMsg").innerHTML = $$("idBoxTxt").value;$$E.removeEvent( document, "keydown", lockup );$$E.removeEvent( this.box, "keydown", lockout );OverLay.close();
}$$("idBoxClose").onclick = function(){ ab.close(); }
$$("idBoxOpen").onclick = function(){ ab.show(); }$$("idCenter").onclick = function(){if(ab.center){ab.center = false;this.value = "居中效果";} else {ab.center = true;this.value = "取消居中";}ab.show();
}$$("idFixed").onclick = function(){if(ab.fixed){ab.fixed = false;this.value = "定位效果";} else {ab.fixed = true;this.value = "取消定位";}ab.show();
}$$("idOverlay").onclick = function(){if(lock){lock = false;this.value = "锁定屏幕";} else {lock = true;this.value = "解锁屏幕";}ab.show();
}})()
</script>
<br />
<br />
<input type="button" value=" 右下角弹窗效果 " id="idBoxOpen2" />
<dl id="idBox2" class="lightbox"><dt><b>右下角消息框</b> </dt><dd><input type="button" value=" 下滚渐隐 " id="idBoxClose2" /></dd>
</dl>
<script>
(function(){
//右下角消息框
var timer, target, current,ab = new AlertBox( "idBox2", { fixed: true,onShow: function(){clearTimeout(timer); this.box.style.bottom = this.box.style.right = 0;},onClose: function(){ clearTimeout(timer); }});function hide(){ab.box.style.bottom = --current + "px";if( current <= target ){ab.close();} else {timer = setTimeout( hide, 10 );}
}$$("idBoxClose2").onclick = function(){target = -ab.box.offsetHeight; current = 0; hide();
}
$$("idBoxOpen2").onclick = function(){ ab.show(); }})()
</script>
<style>
#idBox3_1, #idBox3_2{ width:120px; height:240px; top:30px; border:1px solid #999; display:none;}
#idBox3_1 a, #idBox3_2 a{ position:absolute; bottom:-1.5em; right:0; font-size:12px;color:#00F;}
#idBox3_1 a:hover, #idBox3_2 a:hover{color:#00F;}
#idBox3_1{ left:0;}
#idBox3_2{ right:0;}
</style>
<input type="button" value=" 对联广告效果 " id="idBoxOpen3" />
<div id="idBox3_1"><script type="text/javascript"><!--
google_ad_client = "pub-0342339836871729";
/* 120x240, 创建于 10-10-6 */
google_ad_slot = "9386870680";
google_ad_width = 120;
google_ad_height = 240;
//-->
</script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><a href="#" id="idBoxClose3_1">关闭</a> </div>
<div id="idBox3_2"><script type="text/javascript"><!--
google_ad_client = "pub-0342339836871729";
/* 120x240, 创建于 10-10-6 */
google_ad_slot = "9386870680";
google_ad_width = 120;
google_ad_height = 240;
//-->
</script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><a href="#" id="idBoxClose3_2">关闭</a> </div>
<script>
(function(){
//对联广告效果
var ab1 = new AlertBox( "idBox3_1", { fixed: true } ),ab2 = new AlertBox( "idBox3_2", { fixed: true } );$$("idBoxClose3_1").onclick = $$("idBoxClose3_2").onclick = function(){ab1.close(); ab2.close(); return false;
}$$("idBoxOpen3").onclick = function(){ ab1.show(); ab2.show(); }})()
</script>
<input type="button" value=" 拖动弹窗效果 " id="idBoxOpen4" />
<dl id="idBox4" class="lightbox"><dt id="idBoxTitle4"><b>点击拖动</b> </dt><dd><input type="button" value=" 定位效果 " id="idFixed4" /><input type="button" value=" 关闭 " id="idBoxClose4" /></dd>
</dl>
<script>
(function(){
//拖动弹窗
var ab = new AlertBox("idBox4"), box = ab.box, x, y, flag = "page";$$("idBoxClose4").onclick = function(){ ab.close(); }
$$("idBoxOpen4").onclick = function(){ ab.show(); }$$("idFixed4").onclick = function(){if(ab.fixed){ab.fixed = false;flag = "page";this.value = "定位效果";} else {ab.fixed = true;flag = "client";this.value = "取消定位";}ab.show();
}//拖动
$$E.addEvent($$("idBoxTitle4"), "mousedown", Start);
function Start(e) {$$E.addEvent(document, "mousemove", Move);$$E.addEvent(document, "mouseup", Stop);x = e[flag + "X"] - box.offsetLeft;y = e[flag + "Y"] - box.offsetTop;ab.show();
}
function Move(e) {box.style.left = e[flag + "X"] - x + "px";box.style.top = e[flag + "Y"] - y + "px";
}
function Stop() {$$E.removeEvent(document, "mousemove", Move);$$E.removeEvent(document, "mouseup", Stop);ab.show();
}})()
</script>
</body>
</html>
AlertBox.htm
/*!* AlertBox* Copyright (c) 2010 cloudgamer* Blog: http://cloudgamer.cnblogs.com/* Date: 2010-10-10*///显示层对象
var AlertBox = function(box, options){//初始化程序this._initialize( box, options );this._initBox();
};
AlertBox.prototype = {_initialize: function(box, options) {this.box = $$(box);//显示层this._css = null;//备份样式this._setOptions(options);this.fixed = !!this.options.fixed;this.zIndex = this.options.zIndex;this.onShow = this.options.onShow;this.onClose = this.options.onClose;$$CE.fireEvent( this, "init" );},//设置默认属性_setOptions: function(options) {this.options = {//默认值fixed:        false,//是否固定定位zIndex:        1000,//层叠值onShow:        $$.emptyFunction,//显示时执行onClose:    $$.emptyFunction//关闭时执行
    };return $$.extend(this.options, options || {});},//初始化显示层对象_initBox: function() {var style = this.box.style;this._css = { "display": style.display, "visibility": style.visibility, "position": style.position, "zIndex": style.zIndex };//备份样式style.display = "none";style.visibility = "visible";document.body.insertBefore(this.box, document.body.childNodes[0]);$$CE.fireEvent( this, "initBox" );},//显示show: function(isResize) {//定位显示var style = this.box.style;style.position = this.fixed ? "fixed" : "absolute";style.zIndex = this.zIndex;$$CE.fireEvent( this, "show", isResize );style.display = "block";this.onShow();},//关闭close: function() {this.box.style.display = "none";$$CE.fireEvent( this, "close" );this.onClose();},//销毁程序dispose: function() {$$CE.fireEvent( this, "dispose" );$$D.setStyle( this.box, this._css );//恢复样式//清除属性this.box = this.onShow = this.onClose = null;}
};//修正fixed对象
var RepairFixed = function() {if ( !$$B.ie6 ) return;var layer, body, parent = "__repairfixed";//记录父节点function Create(){//创建定位层函数body = document.bodyif (body.currentStyle.backgroundAttachment !== "fixed") {if (body.currentStyle.backgroundImage === "none") {body.runtimeStyle.backgroundRepeat = "no-repeat";body.runtimeStyle.backgroundImage = "url(about:blank)";}body.runtimeStyle.backgroundAttachment = "fixed";}layer = document.createElement("<div style='position:absolute;border:0;padding:0;margin:0;overflow:hidden;background:transparent;top:expression((document).documentElement.scrollTop);left:expression((document).documentElement.scrollLeft);width:expression((document).documentElement.clientWidth);height:expression((document).documentElement.clientHeight);display:block;'>");Create = $$.emptyFunction;}return {"append": function(elem){Create();elem[ parent ] = elem.parentNode;layer.appendChild(elem).runtimeStyle.position = "absolute";//插入bodyif ( layer.parentNode !== body ) body.insertBefore(layer, body.childNodes[0]);},"remove": function(elem){if ( !layer ) return;//移除元素if ( elem.parentNode === layer ) {elem.runtimeStyle.position = "";elem[ parent ] ? elem[parent].appendChild(elem) : layer.removeChild(elem);elem.removeAttribute(parent);//不能用delete
            }//没有内部元素就移除if ( !layer.childNodes.length && layer.parentNode == body ) body.removeChild(layer);}};
}();//兼容ie6扩展
if ( $$B.ie6 ) { AlertBox.prototype._initialize = (function(){var init = AlertBox.prototype._initialize,methods = {"init": function(){this._iframe = null;//遮盖select的iframethis.fixSelect = !!this.options.fixSelect;},"show": function(isResize) {RepairFixed[ this.fixed ? "append" : "remove" ]( this.box );if ( this.fixSelect ) {if ( !this._iframe ) {this._iframe = this.box.appendChild( document.createElement("<iframe style=\"position:absolute;z-index:-1;filter:alpha(opacity=0);\"></iframe>") );isResize = true;}if ( isResize ) {var size = $$D.getSize(this.box);$$D.setStyle( this._iframe, {height: size.height + "px", width: size.width + "px",top: -this.box.clientTop + "px", left: -this.box.clientLeft + "px"});}}},"close": function() {RepairFixed.remove( this.box );},"dispose": function() {RepairFixed.remove( this.box );if ( this._iframe ) this.box.removeChild( this._iframe );this._iframe = null;}};return function(){var args = [].slice.call(arguments), options = args[1] = args[1] || {};//扩展options
        $$.extend( options, {fixSelect:    true//是否修复select遮盖问题}, false );//扩展钩子$$A.forEach( methods, function( method, name ){$$CE.addEvent( this, name, method );}, this );init.apply( this, args );}
})();}//居中扩展
AlertBox.prototype._initialize = (function(){var init = AlertBox.prototype._initialize,methods = {"init": function(){this._centerCss = null;//记录原始样式this.center = !!this.options.center;},"show": function(isResize){if ( this.center ) {if ( !this._centerCss ) {var style = this.box.style;this._centerCss = { marginTop: style.marginTop, marginLeft: style.marginLeft, left: style.left, top: style.top };isResize = true;}if ( isResize ) {var size = $$D.getSize(this.box);$$D.setStyle( this.box, {marginTop: (this.fixed ? 0 : $$D.getScrollTop()) - size.height / 2 + "px",marginLeft: (this.fixed ? 0 : $$D.getScrollLeft()) - size.width / 2 + "px",top: "50%", left: "50%"});}} else {if ( this._centerCss ) {$$D.setStyle( this.box, this._centerCss ); this._centerCss = null;}}},"dispose": function(){if ( this._centerCss ) $$D.setStyle( this.box, this._centerCss );this._centerCss = null;}};return function(){var args = [].slice.call(arguments), options = args[1] = args[1] || {};//扩展options
        $$.extend( options, {center:    false//是否居中}, false );//扩展钩子$$A.forEach( methods, function( method, name ){$$CE.addEvent( this, name, method );}, this );init.apply( this, args );}
})();//覆盖层
var OverLay = function(){var overlay;function Create(){var lay = document.body.insertBefore(document.createElement("div"), document.body.childNodes[0]);$$D.setStyle( lay, {overflow: "hidden", width: "100%", height: "100%",border: 0, padding: 0, margin: 0, top: 0, left: 0});overlay = new AlertBox( lay, { fixed: true } );Create = $$.emptyFunction;}return {"color":    "#fff",//背景色"opacity":    .5,//透明度(0-1)"zIndex":    100,//层叠值"show": function(){Create();$$D.setStyle( overlay.box, {backgroundColor: this.color, opacity: this.opacity});overlay.zIndex = this.zIndex;overlay.show();},"close": function(){ overlay && overlay.close(); }};
}()
AlertBox.js
/*!* Cloudgamer JavaScript Library v0.1* Copyright (c) 2009 cloudgamer* Blog: http://cloudgamer.cnblogs.com/* Date: 2009-10-15*/var $$, $$B, $$A, $$F, $$D, $$E, $$CE, $$S;(function(undefined){var O, B, A, F, D, E, CE, S;/*Object*/O = function (id) {return "string" == typeof id ? document.getElementById(id) : id;
};O.emptyFunction = function(){};O.extend = function (destination, source, override) {if (override === undefined) override = true;for (var property in source) {if (override || !(property in destination)) {destination[property] = source[property];}}return destination;
};O.deepextend = function (destination, source) {for (var property in source) {var copy = source[property];if ( destination === copy ) continue;if ( typeof copy === "object" ){destination[property] = arguments.callee( destination[property] || {}, copy );}else{destination[property] = copy;}}return destination;
};/*from youa*/
O.wrapper = function(me, parent) {var ins = function() { me.apply(this, arguments); };var subclass = function() {};subclass.prototype = parent.prototype;ins.prototype = new subclass;return ins;
};/*Browser*//*from youa*/
B = (function(ua){var b = {msie: /msie/.test(ua) && !/opera/.test(ua),opera: /opera/.test(ua),safari: /webkit/.test(ua) && !/chrome/.test(ua),firefox: /firefox/.test(ua),chrome: /chrome/.test(ua)};var vMark = "";for (var i in b) {if (b[i]) { vMark = "safari" == i ? "version" : i; break; }}b.version = vMark && RegExp("(?:" + vMark + ")[\\/: ]([\\d.]+)").test(ua) ? RegExp.$1 : "0";b.ie = b.msie;b.ie6 = b.msie && parseInt(b.version, 10) == 6;b.ie7 = b.msie && parseInt(b.version, 10) == 7;b.ie8 = b.msie && parseInt(b.version, 10) == 8;return b;
})(window.navigator.userAgent.toLowerCase());/*Array*/A = function(){var ret = {isArray: function( obj ) {return Object.prototype.toString.call(obj) === "[object Array]";},indexOf: function( array, elt, from ){if (array.indexOf) {return isNaN(from) ? array.indexOf(elt) : array.indexOf(elt, from);} else {var len = array.length;from = isNaN(from) ? 0: from < 0 ? Math.ceil(from) + len : Math.floor(from);for ( ; from < len; from++ ) { if ( array[from] === elt ) return from; }return -1;}},lastIndexOf: function( array, elt, from ){if (array.lastIndexOf) {return isNaN(from) ? array.lastIndexOf(elt) : array.lastIndexOf(elt, from);} else {var len = array.length;from = isNaN(from) || from >= len - 1 ? len - 1: from < 0 ? Math.ceil(from) + len : Math.floor(from);for ( ; from > -1; from-- ) { if ( array[from] === elt ) return from; }return -1;}}};function each( object, callback ) {if ( undefined === object.length ){for ( var name in object ) {if (false === callback( object[name], name, object )) break;}} else {for ( var i = 0, len = object.length; i < len; i++ ) {if (i in object) { if (false === callback( object[i], i, object )) break; }}}};each({forEach: function( object, callback, thisp ){each( object, function(){ callback.apply(thisp, arguments); } );},map: function( object, callback, thisp ){var ret = [];each( object, function(){ ret.push(callback.apply(thisp, arguments)); });return ret;},filter: function( object, callback, thisp ){var ret = [];each( object, function(item){callback.apply(thisp, arguments) && ret.push(item);});return ret;},every: function( object, callback, thisp ){var ret = true;each( object, function(){if ( !callback.apply(thisp, arguments) ){ ret = false; return false; };});return ret;},some: function( object, callback, thisp ){var ret = false;each( object, function(){if ( callback.apply(thisp, arguments) ){ ret = true; return false; };});return ret;}}, function(method, name){ret[name] = function( object, callback, thisp ){if (object[name]) {return object[name]( callback, thisp );} else {return method( object, callback, thisp );}}});return ret;
}();/*Function*/F = (function(){var slice = Array.prototype.slice;return {bind: function( fun, thisp ) {var args = slice.call(arguments, 2);return function() {return fun.apply(thisp, args.concat(slice.call(arguments)));}},bindAsEventListener: function( fun, thisp ) {var args = slice.call(arguments, 2);return function(event) {return fun.apply(thisp, [E.fixEvent(event)].concat(args));}}};
})();/*Dom*/D = {getScrollTop: function(node) {var doc = node ? node.ownerDocument : document;return doc.documentElement.scrollTop || doc.body.scrollTop;},getScrollLeft: function(node) {var doc = node ? node.ownerDocument : document;return doc.documentElement.scrollLeft || doc.body.scrollLeft;},contains: document.defaultView? function (a, b) { return !!( a.compareDocumentPosition(b) & 16 ); }: function (a, b) { return a != b && a.contains(b); },rect: function(node){var left = 0, top = 0, right = 0, bottom = 0;//ie8的getBoundingClientRect获取不准确if ( !node.getBoundingClientRect || B.ie8 ) {var n = node;while (n) { left += n.offsetLeft, top += n.offsetTop; n = n.offsetParent; };right = left + node.offsetWidth; bottom = top + node.offsetHeight;} else {var rect = node.getBoundingClientRect();left = right = D.getScrollLeft(node); top = bottom = D.getScrollTop(node);left += rect.left; right += rect.right;top += rect.top; bottom += rect.bottom;};return { "left": left, "top": top, "right": right, "bottom": bottom };},clientRect: function(node) {var rect = D.rect(node), sLeft = D.getScrollLeft(node), sTop = D.getScrollTop(node);rect.left -= sLeft; rect.right -= sLeft;rect.top -= sTop; rect.bottom -= sTop;return rect;},curStyle: document.defaultView? function (elem) { return document.defaultView.getComputedStyle(elem, null); }: function (elem) { return elem.currentStyle; },getStyle: document.defaultView? function (elem, name) {var style = document.defaultView.getComputedStyle(elem, null);return name in style ? style[ name ] : style.getPropertyValue( name );}: function (elem, name) {var style = elem.style, curStyle = elem.currentStyle;//透明度 from youaif ( name == "opacity" ) {if ( /alpha\(opacity=(.*)\)/i.test(curStyle.filter) ) {var opacity = parseFloat(RegExp.$1);return opacity ? opacity / 100 : 0;}return 1;}if ( name == "float" ) { name = "styleFloat"; }var ret = curStyle[ name ] || curStyle[ S.camelize( name ) ];//单位转换 from jquryif ( !/^-?\d+(?:px)?$/i.test( ret ) && /^\-?\d/.test( ret ) ) {var left = style.left, rtStyle = elem.runtimeStyle, rsLeft = rtStyle.left;rtStyle.left = curStyle.left;style.left = ret || 0;ret = style.pixelLeft + "px";style.left = left;rtStyle.left = rsLeft;}return ret;},setStyle: function(elems, style, value) {if ( !elems.length ) { elems = [ elems ]; }if ( typeof style == "string" ) { var s = style; style = {}; style[s] = value; }A.forEach( elems, function(elem ) {for (var name in style) {var value = style[name];if (name == "opacity" && B.ie) {//ie透明度设置 from jqueryelem.style.filter = (elem.currentStyle && elem.currentStyle.filter || "").replace( /alpha\([^)]*\)/, "" ) + " alpha(opacity=" + (value * 100 | 0) + ")";} else if (name == "float") {elem.style[ B.ie ? "styleFloat" : "cssFloat" ] = value;} else {elem.style[ S.camelize( name ) ] = value;}};});},getSize: function(elem) {var width = elem.offsetWidth, height = elem.offsetHeight;if ( !width && !height ) {var repair = !D.contains( document.body, elem ), parent;if ( repair ) {//如果元素不在body上parent = elem.parentNode;document.body.insertBefore(elem, document.body.childNodes[0]);}var style = elem.style,cssShow = { position: "absolute", visibility: "hidden", display: "block", left: "-9999px", top: "-9999px" },cssBack = { position: style.position, visibility: style.visibility, display: style.display, left: style.left, top: style.top };D.setStyle( elem, cssShow );width = elem.offsetWidth; height = elem.offsetHeight;D.setStyle( elem, cssBack );if ( repair ) {parent ? parent.appendChild(elem) : document.body.removeChild(elem);}}return { "width": width, "height": height };}
};/*Event*/
E = (function(){/*from dean edwards*/var addEvent, removeEvent, guid = 1,storage = function( element, type, handler ){if (!handler.$$guid) handler.$$guid = guid++;if (!element.events) element.events = {};var handlers = element.events[type];if (!handlers) {handlers = element.events[type] = {};if (element["on" + type]) {handlers[0] = element["on" + type];}}};if ( window.addEventListener ) {var fix = { "mouseenter": "mouseover", "mouseleave": "mouseout" };addEvent = function( element, type, handler ){if ( type in fix ) {storage( element, type, handler );var fixhandler = element.events[type][handler.$$guid] = function(event){var related = event.relatedTarget;if ( !related || (element != related && !(element.compareDocumentPosition(related) & 16)) ){handler.call(this, event);}};element.addEventListener(fix[type], fixhandler, false);} else {element.addEventListener(type, handler, false);};};removeEvent = function( element, type, handler ){if ( type in fix ) {if (element.events && element.events[type]) {element.removeEventListener(fix[type], element.events[type][handler.$$guid], false);delete element.events[type][handler.$$guid];}} else {element.removeEventListener(type, handler, false);};};} else {addEvent = function( element, type, handler ){storage( element, type, handler );element.events[type][handler.$$guid] = handler;element["on" + type] = handleEvent;};removeEvent = function( element, type, handler ){if (element.events && element.events[type]) {delete element.events[type][handler.$$guid];}};function handleEvent() {var returnValue = true, event = fixEvent();var handlers = this.events[event.type];for (var i in handlers) {this.$$handleEvent = handlers[i];if (this.$$handleEvent(event) === false) {returnValue = false;}}return returnValue;};}function fixEvent(event) {if (event) return event;event = window.event;event.pageX = event.clientX + D.getScrollLeft(event.srcElement);event.pageY = event.clientY + D.getScrollTop(event.srcElement);event.target = event.srcElement;event.stopPropagation = stopPropagation;event.preventDefault = preventDefault;var relatedTarget = {"mouseout": event.toElement, "mouseover": event.fromElement}[ event.type ];if ( relatedTarget ){ event.relatedTarget = relatedTarget;}return event;};function stopPropagation() { this.cancelBubble = true; };function preventDefault() { this.returnValue = false; };return {"addEvent": addEvent,"removeEvent": removeEvent,"fixEvent": fixEvent};
})();/*CustomEvent*/CE = (function(){var guid = 1;return {addEvent: function( object, type, handler ){if (!handler.$$$guid) handler.$$$guid = guid++;if (!object.cusevents) object.cusevents = {};if (!object.cusevents[type]) object.cusevents[type] = {};object.cusevents[type][handler.$$$guid] = handler;},removeEvent: function( object, type, handler ){if (object.cusevents && object.cusevents[type]) {delete object.cusevents[type][handler.$$$guid];}},fireEvent: function( object, type ){if (!object.cusevents) return;var args = Array.prototype.slice.call(arguments, 2),handlers = object.cusevents[type];for (var i in handlers) {handlers[i].apply(object, args);}},clearEvent: function( object ){if (!object.cusevents) return;for (var type in object.cusevents) {var handlers = object.cusevents[type];for (var i in handlers) {handlers[i] = null;}object.cusevents[type] = null;}object.cusevents = null;}};
})();/*String*/S = {camelize: function(s){return s.replace(/-([a-z])/ig, function(all, letter) { return letter.toUpperCase(); });}
};/*System*/// remove css image flicker
if (B.ie6) {try {document.execCommand("BackgroundImageCache", false, true);} catch(e) {}
};/*define*/$$ = O; $$B = B; $$A = A; $$F = F; $$D = D; $$E = E; $$CE = CE; $$S = S;})();
CJL.0.1.js

转载:http://www.cnblogs.com/cloudgamer/

转载于:https://www.cnblogs.com/wzq806341010/p/3369885.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/462010.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

easyUI 绑定右键菜单在数据行上显示

easyUI的显示数据的div都有一个样式,如下图 所有的表格都有一个datagrid-cell的样式那么这个时候我们就可以利用jquery来做时间的绑定了 下面是主要的js代码: /*绑定右键*/$(".datagrid-cell").live(contextmenu,function(e){//显示快捷菜单$(#mm).menu(show, {left:…

web前端细解cookie那些事

web前端细解cookie那些事&#xff0c;在互联网时代&#xff0c;IT行业飞速发展&#xff0c;带动了web前端开发行业的兴趣。由于行业新兴起时间不久&#xff0c;专业人才缺乏&#xff0c;薪资待遇较高&#xff0c;已成为众多IT学子选择就业的首选&#xff0c;今天就为分享一些有…

一个C程序的编译过程(Linux环境下Gcc)

一 以下是C程序一般的编译过程&#xff1a; 从图中看到&#xff1a; 将编写的一个c程序&#xff08;源代码 &#xff09;转换成可以在硬件上运行的程序&#xff08;可执行代码 &#xff09;&#xff0c;需要进行编译阶段 和链接这两个阶段。 其中&#xff0c; 1. 编译阶段先通…

Mysql数据导入导出

导出导入数据库导出mysqldump方法mysqldump -u用户名 -p密码名 database [table]> 目标文件导入mysql -uroot -prootuse databasesource 目标文件&#xff1b;PS: 这种方法是导出整个表数据&#xff0c;并且带着建表信息&#xff0c;假如导入的数据库有同名的表&#xff0c;…

Screen Painter 程序设计

一、Screen 的创建及维护, TCode:SE51 输入程序名称&#xff0c;单击【建立】&#xff0c; 程序1000为SAP预留屏幕号&#xff0c;屏幕号必须定义1000外的其他数字&#xff0c;且最多不超过四位&#xff0c; 本例定义屏幕为SAP预留屏幕号为&#xff1a;100 * 属性设置&#xff1…

完全图解VS2017安装过程并演示VS2017创建Linux项目和调试

VS2017个人免费版即社区官方下载地址为&#xff1a;https://download.microsoft.com/download/D/1/4/D142F7E7-4D7E-4F3B-A399-5BACA91EB569/vs_Community.exe 这是一个很小的在线下载安装器。VS2017安装变得人性化了&#xff0c;根据组件的分类&#xff0c;供安装用户选择&…

spring--打印hello--注解component--自动创建对象

1.创建 GroupId----项目目录&#xff08;com.javaspring&#xff09; Artifactid---项目名称(spring01qiuckstart) Version--版本默认 2.默认打开的pom.xml文件 编辑---编写spring核心项目依赖 <?xml version"1.0" encoding"UTF-8"?> <project …

嵌入式C语言之struct内存分配分析

本文源于微信号《嵌入式ARM》。链接&#xff1a;http://mp.weixin.qq.com/s/j2mk6jY79nrJge2cDZVH_A 对结构MyStruct采用sizeof会出现什么结果呢&#xff1f;sizeof(MyStruct)为多少呢&#xff1f; 也许你会这样求&#xff1a;sizeof(MyStruct)sizeof(double)sizeof(char)sizeo…

PostMessage发送字符串和结构体

2019独角兽企业重金招聘Python工程师标准>>> 1.首先定义消息变量 #define WM_POST_MSG WM_USER 2 2.增加消息处理函数 afx_msg LRESULT UpdateStatic(WPARAM wParam, LPARAM lParam); 3.增加消息映射 ON_MESSAGE(WM_POST_MSG,UpdateStatic) 当调用PostMessage函…

SPI、I2C、UART(即串口)三种串行总线详解

以下内容均来源于网络资源的学习与整理&#xff0c;如有侵权请告知删除。 参考博客 几个串口协议学习整理 UART IIC SPI_mainn的博客-CSDN博客 SPI、I2C、UART三种串行总线的原理、区别及应用_嵌入式Linux,的博客-CSDN博客 RS-232 和 UART 之间有什么区别&#xff1f; - 知乎…

用数据辅助设计-搜索中的实践

设计时不能单凭经验和直觉&#xff0c;因为涉及到的目标人群、场景、操作习惯的不同。为了获取更准确、有效的信息去辅助、检测设计&#xff0c;设计师会选择定性&#xff08;用户访谈、焦点小组&#xff09;和定量&#xff08;调研问卷、网站数据分析&#xff09;的方式进行用…

在IBM服务器安装Windows server 2012的心得

一个简单的问题被我搞复杂了&#xff01; 前些日子&#xff0c;由于连接服务器时卡顿、没有反应&#xff0c;我把服务器强制重启了&#xff0c;之后很不幸地&#xff0c;系统开机进入界面后&#xff0c;不断地转圈圈&#xff0c;一段时间后提示“你的电脑遇到问题&#xff0c;…

VisualVM远程连接Linux服务器通过jstatd方式监控JVM内存状态

2019独角兽企业重金招聘Python工程师标准>>> VisualVM远程连接Linux监控JVM的方式有两种,一种是jstatd,另外一种是JMX,这里描述jstatd的方式: 1.通过google/baidu出来的文章做法大致都雷同这里给出我开始参考的连接http://lixjluck.iteye.com/blog/516447 2. 但是…

SD读写流程

一、1bit-4bit数据传输对比 CPU/EDMA与SD的数据传输可以设置为1bit或4bit模式&#xff0c;1bit模式仅使用DAT0数据线&#xff0c;4bit模式使用DAT3-DAT0四位数据线。例如&#xff0c;传输512字节的数据&#xff0c;传输的数据格式如下图所示&#xff1a; 二、读写命令 读写分为…

ubuntu14.04 64bit主机下面安装android的NDK开发环境

通过wget工具下载bin包&#xff1a; $ wget -c http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin1 2&#xff0c;因为下载下来的是bin包&#xff0c;所以可以直接移动到需要安装的目录下面。 将Android NDK bin包移动到你想要的目录下,如 /opt/NDK/1 $ …

二维数组数和指针操作的理解

#include<string.h> #include <stdio.h> int main(void) {int a[4][2] { { 2,4 },{ 6,8 },{ 1,3 },{ 5,7 } };char *p[5] { "acvsadf", "cwerqwenn", "tttttt" };//字符串指针数组int c[4] { 0,1,2,3 };int *ptr c;/*这个正确&…

最近重构公司消息服务的架构设计

目标 研发一套独立的消息系统&#xff0c;此系统进行集中配置管理供各业务系统使用&#xff0c;用于支撑站内信、短信通知、短信验证码、邮件、微信消息、APP消息、IM等消息形式。 架构 1&#xff09; 基于消息队列采用发布、订阅模式。消息的生产者为对外的消息接口&#xff0…

高性能的MySQL(6)查询慢与重构查询

只有好的库表结构、合理的索引还不够&#xff0c;我们还需要合理的设计查询&#xff0c;齐头并进&#xff0c;一个不少才能充分发挥MySQL的优势。一、查询为什么会慢&#xff1f;每一个查询由一系列的子任务组成&#xff0c;每个子任务都会消耗一定的时间。这个我们在之前的单个…

一道大小端题目

今天看到一道关于大小端的题目&#xff0c;觉得很有趣&#xff0c;理解一番后摘抄如下&#xff1a; 题目&#xff1a; 示意图&#xff1a; 结果说明&#xff1a; 小端模式 大端模式

算法复杂度速查表

图例 数据结构操作 数组排序算法 图操作 堆操作 大 O 复杂度图表 Big O 复杂度 推荐阅读 Cracking the Coding Interview: 150 Programming Questions and Solutions[33] Introduction to Algorithms, 3rd Edition[34] Data Structures and Algorithms in Java (2nd Edition)…