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

📄 htmldebug.js

📁 vc-mfc编程实例 很简单的东西,以后回多传自己的东西
💻 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 + -