?? msalert.js
字號:
//Modified By Cj, 2000/8/28
//All rights reserved. (C) Mindsware Corporation 2000
function GetRootDir(){
// Modified By Wesley, 2000/12/7
// modified by wesley, 2001/06/26 改正了對于 http://servername/index.asp 的問題
var strLocation, strVirtualDirName;
var intStartPos, intEndPos;
strLocation = top.window.location.href;
// 形式為 http://ServerName/VirtualDirName/xxx/xxx.asp
// 特別是對于彈出窗口,top.window.location.href的值肯定不是http://ServerName/VirtualDirName/index.asp
// 所以不能從后往前取
// 去掉http:
intStartPos = strLocation.indexOf("//");
if (intStartPos == -1) // 不包含//,只好返回"/"
return "/"; // modified by wesley, 2001/06/26
// 去掉//ServerName
intStartPos = strLocation.indexOf("/", intStartPos + 2);
if (intStartPos == -1) // 不包含/,只好返回"/"
return "/"; // modified by wesley, 2001/06/26
// 得到VirtualDirName
intEndPos = strLocation.indexOf("/", intStartPos + 1);
if (intEndPos == -1){
// 后面沒有了,所以目前拿到的就是VirtualDirName
return "/"; // modified by wesley, 2001/06/26
}
// 找到了VirtualDirName后面的那個 /
// modified by wesley, 2001/06/26
return strLocation.substr(intStartPos, intEndPos - intStartPos + 1);
}
function MWalert(intType,strMessage){
var strTemp;
var strVersion;
var varReturn;
strVersion = navigator.appVersion;
strTemp = GetRootDir() + "MsDialog/alertwindow.asp?intType=" + intType +"&strMessage="+strMessage + "&Rnd=" + Math.random();
if(strVersion.indexOf("MSIE 5")!=0 && strVersion.indexOf("MSIE 5")!=-1)
varReturn = top.window.showModalDialog(strTemp,"Dialog Arguments Value","dialogHeight: 200px; dialogWidth: 300px; center: Yes; help: No; resizable: No; status: no;");
else{
varReturn = top.window.showModalDialog(strTemp,"Dialog Arguments Value","dialogHeight: 200px; dialogWidth: 300px; center: Yes; help: No; resizable: no; status: no;");
}
return varReturn;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -