📄 htmldebug.js
字号:
var HTMLDebug=function()
{
this.windowPointer=null;
this.recallPostCount=0;
this.documentPointer=null;
this.bodyPointer=null;
this.previousHM=0;
this.isEnable=true;
this.post=function(msg)
{
if (this.isEnable==false)
{
return;
}
if(this.windowPointer==null)
{
this.windowPointer=window.open("about:blank",null,"height=500,width=400,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes");
this.windowPointer.document.body.onbeforeunload=this.getCloseFun(this);
this.documentPointer=this.windowPointer.document;
this.bodyPointer=this.documentPointer.body;
}
var adt=new Date();
var nowHM=0;
var intervalHM=0;
if (this.previousHM!=0)
{
nowHM=adt.getTime();
intervalHM=(nowHM-this.previousHM)
}
this.previousHM=adt.getTime();
var localstringdate=(adt.toLocaleString());
var tmpDiv=this.documentPointer.createElement("div");
if (intervalHM==0)
{
tmpDiv.innerHTML=localstringdate+" (间隔"+intervalHM+"毫秒) --- "+msg;
}
else
{
tmpDiv.innerHTML=localstringdate+" (间隔"+intervalHM+"毫秒) --- "+msg;
}
tmpDiv.style.color="#333399";
tmpDiv.style.fontSize="12px";
this.bodyPointer.appendChild(tmpDiv);
}
this.getCloseFun=function(obj)
{
return function()
{
obj.windowPointer=null;
}
}
this.Enable=function(flag)
{
if (!(flag==true || flag==false))
{
return;
}
this.isEnable=flag;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -