📄 alertmsg.htm
字号:
<link href="css/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#Layer1_close {
position:absolute;
left:238px;
top:7px;
width:18px;
height:17px;
z-index:4;
}
</style>
<script language="javascript" src="js/comm.js" type="text/javascript"></script>
<script language="javascript">
// import js document
_import("function");
_import("language");
_import("langSet");
_import("webmenuevent");
_import("control");
</script>
<body style="overflow:hidden;" onkeydown="try{return testCode(event.keyCode)}catch(e){}">
<div id="Layer1_close" style="display:none;">
<div style="cursor:hand;" onClick="window.external.OnOK();" onMouseOver="changeSubImgTo(this,'pic/close_red.gif')" onMouseOut="changeSubImgTo(this,'pic/close_blue.gif')"><img src="pic/close_blue.gif" ondragstart="changeSubImgTo(this.parentNode,'pic/close_blue.gif');return false;" width="16" height="16" /></div></div>
<table style="position:absolute; left:0px; top:0px" width="265" border="0" cellspacing="0" cellpadding="0" id="boxwidth">
<tr>
<td background="images/alert_msg_r1_c5.jpg" onMouseDown="moveWindow();"><table width="165" height="29" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="alert_title" width="165" background="images/alert_msg_r1_c1.jpg" style="background-repeat:no-repeat;"> </td>
</tr>
</table></td>
<td align="right" background="images/alert_msg_r1_c5.jpg" onMouseDown="moveWindow();"><table width="30%" height="29" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background-image:url(images/alert_msg_top_right.jpg); background-repeat:no-repeat; background-position:right;"> </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><img src="images/alert_msg_r4_c1.jpg" width="9" height="6" /></td>
<td><img src="" width="1" height="1" alt="" /></td>
<td align="right" valign="top"><img src="images/alert_msg_r4_c11.jpg" width="9" height="6" /></td>
</tr>
</table>
<table width="100%" height="100" border="0" cellpadding="0" cellspacing="0" id="boxheight">
<tr>
<td width="10" align="left" valign="bottom" background="images/alert_msg_r5_c1.jpg" style="background-position:left; background-repeat:repeat-y;"> </td>
<td style="background-repeat:repeat-x; background-position:bottom;">
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" id="msgTextTable">
<tr>
<td width="50" align="center" valign="top" ><img id="iconShow" src="images/spacer.gif" width="34" height="34" /></td>
<td class="arial12pinkbold" style="padding-left:10px;" id="fontcolortd"><span id="rit_msg"> </span></td>
</tr>
<tr>
<td colspan="2" align="center" style="padding-top:10px;">
<div style="height:21px; display:none;" class="Arial12black" id="button_ok">
<button id="alert_button_ok_ok" cstyle="rit" style="display:none;" onClick="window.external.OnOK();">OK</button>
</div>
<div style="height:21px; display:none;" class="Arial12black" id="button_yesorno">
<button id="alert_button_yesno_yes" cstyle="rit" style="display:none;" onClick="setSD('yes')">Yes</button>
<button id="alert_button_yesno_no" cstyle="rit" style="display:none;" onClick="setSD('no')">No</button>
</div>
<div style="height:21px; display:none;" class="Arial12black" id="button_okcancel">
<button id="alert_button_okcancel_ok" cstyle="rit" style="display:none;" onClick="setSD('yes')">OK</button>
<button id="alert_button_okcancel_cancel" cstyle="rit" style="display:none;" onClick="setSD('no')">Cancel</button>
</div>
<div style="height:21px; display:none;" class="Arial12black" id="button_tryagain">
<button id="alert_button_tryagaincancel_tryagain" cstyle="rit" style="display:none;" onClick="setSD('yes')">Try again</button>
<button id="alert_button_tryagaincancel_cancel" cstyle="rit" style="display:none;" onClick="setSD('no')">Cancel</button>
</div>
<div style="height:21px; display:none;" class="Arial12black" id="button_continuecancel">
<button id="alert_button_continuecancel_continue" cstyle="rit" style="display:none;" onClick="setSD('yes')">Continue</button>
<button id="alert_button_continuecancel_cancel" cstyle="rit" style="display:none;" onClick="setSD('no')">Cancel</button>
</div>
<div style="height:21px; display:none;" class="Arial12black" id="button_terminatecontinue">
<button id="alert_button_terminatecontinue_terminate" cstyle="rit" style="display:none;" onClick="setSD('yes')">Continue</button>
<button id="alert_button_terminatecontinue_continue" cstyle="rit" style="display:none;" onClick="setSD('no')">Cancel</button>
</div>
<div style="height:21px; display:none;" class="Arial12black" id="button_deletecancel">
<button id="alert_button_deletecancel_delete" cstyle="rit" style="display:none;" onClick="setSD('yes')">Continue</button>
<button id="alert_button_deletecancel_cancel" cstyle="rit" style="display:none;" onClick="setSD('no')">Cancel</button>
</div>
</td>
</tr>
</table></td>
<td width="10" align="right" valign="bottom" background="images/alert_msg_r5_c10.jpg" style="background-position:right; background-repeat:repeat-y;"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" valign="top" background="images/alert_msg_bottom_center.jpg" style="background-position:top; background-repeat:repeat-x;"><img src="images/alert_msg_bottom_left.jpg" width="9" height="12" /></td>
<td width="90%" background="images/alert_msg_bottom_center.jpg" style="background-position:top; background-repeat:repeat-x;"> </td>
<td width="5%" align="right" valign="top" background="images/alert_msg_bottom_center.jpg" style="background-position:top; background-repeat:repeat-x;"><img src="images/alert_msg_bottom_right.jpg" width="9" height="12" /></td>
</tr>
</table></td>
</tr>
</table>
<script language="jscript">
var isMove=true;
var leftButtonId="";
var rightButtonId="";
function moveWindow() {
if (isMove) {
window.external.OnMoveWindow();
}
}
document.body.onload=function() {
applyButton();
document.getElementById("Layer1_close").style.display="";
document.getElementById("Layer1_close").style.left=(Request("width")-26)+"px";
$("alert_button_ok_ok").setValue(GS("Button_OK")+" ");
$("alert_button_yesno_yes").setValue(GS("Button_Yes")+" ");
$("alert_button_yesno_no").setValue(GS("Button_No")+" ");
$("alert_button_okcancel_ok").setValue(GS("Button_OK")+" ");
$("alert_button_okcancel_cancel").setValue(GS("Button_Cancel")+" ");
$("alert_button_tryagaincancel_tryagain").setValue(GS("Button_try_again")+" ");
$("alert_button_tryagaincancel_cancel").setValue(GS("Button_Cancel")+" ");
$("alert_button_continuecancel_continue").setValue(GS("Button_Continue")+" ");
$("alert_button_continuecancel_cancel").setValue(GS("Button_Cancel")+" ");
$("alert_button_terminatecontinue_terminate").setValue(GS("Button_Terminate")+" ");
$("alert_button_terminatecontinue_continue").setValue(GS("Button_Continue")+" ");
$("alert_button_deletecancel_delete").setValue(GS("Button_Delete")+" ");
$("alert_button_deletecancel_cancel").setValue(GS("Button_Cancel")+" ");
//navy 2007.8.21
$("alert_title").background="images/alert_msg_r1_c1"+samplelang+".jpg";
var msgStr1=window.external.GetStaticData();
window.external.SetStaticData("");
msgStr1=msgStr1.replace("[|L]","\/")
msgStr1=msgStr1.replace("[|R]","\\")
msgStr1=unescape(msgStr1);
if(/[^(\s\(\))]{21}/.test(msgStr1))
{
//var tmpChangeStr;
//tmpChangeStr=msgStr1.match(/[^(\s\(\))]{20}/g);
//for (i=0;i<tmpChangeStr.length;i++)
//{
//msgStr1=msgStr1.replace(tmpChangeStr[i],tmpChangeStr[i]+" ");
//}
}
if (Request("msgtype")=="info")
{
document.getElementById("iconShow").src="images/alert_icon_info.jpg"
document.getElementById("fontcolortd").className="Arial12Lightbluebold";
document.getElementById("button_ok").style.display="block";
//document.getElementById("okButtonFocus").focus();
leftButtonId="okButtonFocus";
rightButtonId="okButtonFocus";
}
else if (Request("msgtype")=="custom")
{
var btval=Request("btval");
document.getElementById("alert_button_ok_ok").setValue(btval);
document.getElementById("iconShow").src="images/alert_icon_info.jpg"
document.getElementById("fontcolortd").className="arial12pinkbold";
document.getElementById("button_ok").style.display="block";
//document.getElementById("okButtonFocus").focus();
leftButtonId="okButtonFocus";
rightButtonId="okButtonFocus";
}
else if (Request("msgtype")=="alert")
{
document.getElementById("iconShow").src="images/alert_icon_error.jpg"
document.getElementById("fontcolortd").className="arial12pinkbold";
document.getElementById("button_ok").style.display="block";
//document.getElementById("okButtonFocus").focus();
leftButtonId="okButtonFocus";
rightButtonId="okButtonFocus";
}
else if (Request("msgtype")=="confirm")
{
document.getElementById("iconShow").src="images/alert_icon_warm.JPG"
document.getElementById("fontcolortd").className="Arial12blackbold";
document.getElementById("button_yesorno").style.display="block";
//document.getElementById("yesNoButtonFocus").focus();
leftButtonId="yesNoButtonFocus";
rightButtonId="yesNoButtonFocus2";
}
else if (Request("msgtype")=="okcancel")
{
document.getElementById("iconShow").src="images/alert_icon_warm.JPG"
document.getElementById("fontcolortd").className="Arial12blackbold";
document.getElementById("button_okcancel").style.display="block";
//document.getElementById("okCancelButtonFocus").focus();
leftButtonId="okCancelButtonFocus";
rightButtonId="okCancelButtonFocus2";
}
else if (Request("msgtype")=="tryagain")
{
document.getElementById("iconShow").src="images/alert_icon_warm.JPG"
document.getElementById("fontcolortd").className="Arial12blackbold";
document.getElementById("button_tryagain").style.display="block";
//document.getElementById("tryagainButtonFocus").focus();
leftButtonId="tryagainButtonFocus";
rightButtonId="tryagainButtonFocus2";
}
else if (Request("msgtype")=="continuecancel")
{
document.getElementById("iconShow").src="images/alert_icon_warm.JPG"
document.getElementById("fontcolortd").className="Arial12blackbold";
document.getElementById("button_continuecancel").style.display="block";
//document.getElementById("continuecancelButtonFocus").focus();
leftButtonId="continuecancelButtonFocus";
rightButtonId="continuecancelButtonFocus2";
}
else if (Request("msgtype")=="terminatecontinue")
{
document.getElementById("iconShow").src="images/alert_icon_warm.JPG"
document.getElementById("fontcolortd").className="Arial12blackbold";
document.getElementById("button_terminatecontinue").style.display="block";
//document.getElementById("continuecancelButtonFocus").focus();
leftButtonId="terminatecontinueButtonFocus";
rightButtonId="terminatecontinueButtonFocus2";
}
else if (Request("msgtype")=="deletecancel")
{
document.getElementById("iconShow").src="images/alert_icon_warm.JPG"
document.getElementById("fontcolortd").className="Arial12blackbold";
document.getElementById("button_deletecancel").style.display="block";
//document.getElementById("continuecancelButtonFocus").focus();
leftButtonId="deletecancelButtonFocus";
rightButtonId="deletecancelButtonFocus2";
}
document.getElementById("boxwidth").width=Request("width");
document.getElementById("boxheight").height=Request("height")-47;
document.getElementById("rit_msg").innerHTML=msgStr1;
}
function testCode(id) {
if(id==32) { return false; }
if (id==37) {
var leftbtobj=document.getElementById(leftButtonId);
if (leftbtobj!=null) {
leftbtobj.focus();
}
}
else if(id==39) {
var leftbtobj=document.getElementById(rightButtonId);
if (leftbtobj!=null) {
leftbtobj.focus();
}
}
}
function setSD(str) { window.external.SetStaticData(str);window.external.OnOK(); }
function changeSubImgTo(parentNodeObj,url)
{
var childNodesArray=parentNodeObj.childNodes;
if (childNodesArray[0].src!=url)
{
childNodesArray[0].src=url;
}
}
</script>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -