📄 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 src="js/control.js"></script>
<script src="js/AJAX.js"></script>
<script src="js/function.js"></script>
<script src="js/language.js"></script>
<body style="overflow:hidden;" onkeydown="return testCode(event.keyCode)">
<div id="Layer1_close" style="display:none;">
<div style="cursor:hand;" onClick="window.external.OnOK();" onMouseOver="changeSubImgTo(this,'images/close_red.gif')" onMouseOut="changeSubImgTo(this,'images/close_blue.gif')"><img src="images/close_blue.gif" ondragstart="changeSubImgTo(this.parentNode,'images/close_blue.gif');return false;" width="16" height="16"></div></div>
<table 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="poptd" 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" ><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 cstyle="rit" onClick="window.external.OnOK();" id="buttonok">Ok</button>
</div>
<div style="height:21px; display:none;" class="Arial12black" id="button_yesorno">
<span onClick="setSD('yes')"><a id="yesNoButtonFocus" href="#" onClick="setSD('yes')"><img style="border:1px solid #FFFFFF;" src="images/alert_botton_yes.jpg" width="47" height="21" border="0" /></a></span>
<span onClick="setSD('no')"><a id="yesNoButtonFocus2" href="#" onClick="setSD('no')"><img style="border:1px solid #FFFFFF;" src="images/alert_botton_no.jpg" width="43" height="21" border="0" /></a></span> </div>
<div style="height:21px; display:none;" class="Arial12black" id="button_okcancel">
<span onClick="setSD('yes')"><a id="okCancelButtonFocus" href="#" onClick="setSD('yes')"><img style="border:1px solid #FFFFFF;" src="images/alert_botton_ok_small.jpg" width="47" height="21" border="0" /></a></span>
<span onClick="setSD('no')"><a id="okCancelButtonFocus2" href="#" onClick="setSD('no')"><img style="border:1px solid #FFFFFF;" src="images/cancelbutton.jpg" width="48" height="21" border="0" /></a></span> </div>
<div style="height:21px; display:none;" class="Arial12black" id="button_tryagain">
<span onClick="setSD('yes')"><a id="tryagainButtonFocus" href="#" onClick="setSD('yes')"><img style="border:1px solid #FFFFFF;" src="images/tryagainbutton.jpg" width="66" height="21" border="0" /></a></span>
<span onClick="setSD('no')"><a id="tryagainButtonFocus2" href="#" onClick="setSD('no')"><img style="border:1px solid #FFFFFF;" src="images/cancelbutton.jpg" width="48" height="21" border="0" /></a></span> </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";
var msgStr1=window.external.GetStaticData();
window.external.SetStaticData("");
msgStr1=msgStr1.replace("[|L]","\/")
msgStr1=msgStr1.replace("[|R]","\\")
msgStr1=unescape(msgStr1);
//alert(msgStr1);
if(/[a-zA-Z0-9]{21}/.test(msgStr1))
{
var tmpChangeStr;
tmpChangeStr=msgStr1.match(/[a-zA-Z0-9]{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")=="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";
}
document.getElementById("boxwidth").width=Request("width");
document.getElementById("boxheight").height=Request("height")-47;
document.getElementById("rit_msg").innerHTML=msgStr1;
//alert(document.getElementById("rit_msg").innerHTML);
document.getElementById("poptd").style.backgroundImage ="url(images/alert_msg_r1_c1"+langid+".jpg)";
$("buttonok").setValue(GS("button_ok"));
}
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 + -