common.js

来自「一个免费wap站」· JavaScript 代码 · 共 30 行

JS
30
字号
/**
 * Open the url in target window.
 *
 */
function jumpToLink(url, target) {
    if (url.indexOf("?") == -1)
	    url = url + "?tempID=" + Math.ceil(Math.random()*100000000000);
	else
	    url = url + "&tempID=" + Math.ceil(Math.random()*100000000000);
	if (target == null || target == "")
		location.href = url;
	else
		window.open(url, target)
}

/**
 * Open the dialog for url in specified width / height.
 */
function showDialog(url, dlgWidth, dlgHeight) {
	var baseURL = "../common/modalDialog.htm";
	var features = "dialogHeight: " + dlgHeight
			+ "px; dialogWidth: " + dlgWidth + "px; help: No; center: Yes; resizable: No; status: No;";
	return window.showModalDialog(baseURL, url, features);
}

function showSmartDialog(url, dlgWidth, dlgHeight) {
	if (showDialog(url, dlgWidth, dlgHeight) == "reload")
		window.location.reload();
}

⌨️ 快捷键说明

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