⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debug.js

📁 java高级引用管理综合朝鲜经java高级引用管理综合朝鲜经java高级引用管理综合朝鲜经java高级引用管理综合朝鲜经
💻 JS
字号:
/*
debug.js

{{IS_NOTE
	Purpose:
		
	Description:
		
	History:
		January 10, 2008 4:58:31 PM , Created by Dennis Chen
}}IS_NOTE

Copyright (C) 2008 Potix Corporation. All Rights Reserved.

{{IS_RIGHT
	This program is distributed under GPL Version 2.0 in the hope that
	it will be useful, but WITHOUT ANY WARRANTY.
}}IS_RIGHT
*/
var XDEBUG_SWITCH = true;
var XDEBUG_MSG_COUNT = 0;
var XDEBUG_POS_TOP = '2px';
var XDEBUG_POS_LEFT = '700px';
var XDEBUG_POS_WIDTH = '600px';
var XDEBUG_POS_HEIGHT = '500px';

window.xdebug = {};

xdebug.debug = function(msg){
    if(!XDEBUG_SWITCH ) return;
    var mydebug = document.getElementById("mydebug");
    
    if(!mydebug){
       
        var comp =
            "<div style='z-index:9000;position:absolute;top:"+XDEBUG_POS_TOP+";left:"+XDEBUG_POS_LEFT+";width:"+XDEBUG_POS_WIDTH+";height:"+XDEBUG_POS_HEIGHT+";'>"
            +"<input type='button' value='clear' onclick='clearDebugMsg()'>"
            +"<div style='overflow:auto;border:solid 1px;height:100%;width:100%'>"
            +"<table id='mydebug' width='100%' class='mydebug' border='0' cellspacing='0' cellpadding='0'><tbody></tbody></table>"
            +"</div></div>";
        var el = document.createElement("div");
       
        el.innerHTML = comp;
        
        document.body.appendChild(el);
        mydebug = document.getElementById("mydebug");
       	mydebug.root = el;
    }
    XDEBUG_MSG_COUNT++;
   
    var tb = mydebug.firstChild;
    var it = tb.innerHTML;
    var now = new Date();
   
    var tr = document.createElement("tr");
    if(tb.firstChild){
        tb.insertBefore(tr,tb.firstChild);
    }else{
        tb.appendChild(tr);
    }
    var td = document.createElement("td");
    td.setAttribute("valing","top");
    td.setAttribute("width","5%");
    td.innerHTML=""+XDEBUG_MSG_COUNT;
    tr.appendChild(td);
   
    var td = document.createElement("td");
    td.setAttribute("valing","top");
    td.innerHTML=msg;
    tr.appendChild(td);
   
    var td = document.createElement("td");
    td.setAttribute("valing","top");
    td.setAttribute("width","10%");
    td.innerHTML;
    tr.appendChild(td);

};

function clearDebugMsg(){
    if(!XDEBUG_SWITCH) return;
    var mydebug = document.getElementById("mydebug");
    if(mydebug){
		document.body.removeChild(mydebug.root);
        /*while(mydebug.firstChild){
            mydebug.removeChild(mydebug.firstChild);
        }
        mydebug.appendChild(document.createElement("tbody"));*/
    }
    XDEBUG_MSG_COUNT = 0;
};




zk.eval = function (n, fn, type, a0, a1, a2, a3, a4, a5, a6, a7) {
	if (!type) type = $type(n);
	if (type) {
		var o = window["zk" + type];
		if (o) {
			var f = o[fn];
			if (f) {
				try {
					return f(n,a0,a1,a2,a3,a4,a5,a6,a7);
				} catch (ex) {
					throw ex;
				}
			}
		}
	}
	return false;
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -