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

📄 dialog.js

📁 自己写的一个网络日志(BLOG)系统
💻 JS
字号:
function getAbsolutePos(el) {	var r = { x: el.offsetLeft, y: el.offsetTop };	if (el.offsetParent) {		var tmp = getAbsolutePos(el.offsetParent);		r.x += tmp.x;		r.y += tmp.y;	}	return r;};function __dlg_onclose() {	opener.Dialog._return(null);};function __dlg_init(bottom) {	var body = document.body;	var body_height = 0;	if (typeof bottom == "undefined") {		var div = document.createElement("div");		body.appendChild(div);		var pos = getAbsolutePos(div);		body_height = pos.y;	} else {		var pos = getAbsolutePos(bottom);		body_height = pos.y + bottom.offsetHeight;	}	window.dialogArguments = opener.Dialog._arguments;	if (!document.all) {		window.sizeToContent();		window.sizeToContent();		window.addEventListener("unload", __dlg_onclose, true);		window.innerWidth = body.offsetWidth;		window.innerHeight = body_height;	} else {		window.resizeTo(body.offsetWidth, body_height);		var ch = body.clientHeight;		var cw = body.clientWidth;		window.resizeBy(body.offsetWidth - cw, body_height - ch);	}};function __dlg_close(val) {	opener.Dialog._return(val);	window.close();};

⌨️ 快捷键说明

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