📄 function.js
字号:
function open_window_full(Url, TitleStr, MaxW, MaxH, Dire)
{
if (Dire == "0") //在屏幕中间打开
{
PosX = window.screen.width / 2 - MaxW / 2;
PosY = window.screen.height / 2 - MaxH / 2;
}
if (Dire == "1") //在屏幕右下角打开
{
PosX = window.screen.width - MaxW;
PosY = window.screen.height - 200 - 50;
}
if (Dire == "2") //在屏幕左上角打开
{
PosX = 50;
PosY = 50;
}
str_tmp = "fullscreen=1,width=" + MaxW + ",height=" + MaxH + ",top=" + PosY + ",left=" + PosX;
var pop = window.open(Url, TitleStr, str_tmp);
pop.resizeTo(MaxW, MaxH);
pop.moveTo(PosX, PosY);
}
function open_window(Url, TitleStr, MaxW, MaxH, str_tmp)
{
PosX = window.screen.width / 2 - MaxW / 2;
PosY = window.screen.height / 2 - MaxH / 2;
if (str_tmp == "")
str_tmp = "resizable=no,scrollbars=no,scroll=no,status=no,toolbar=no,menubar=no,location=no,width=" + MaxW + ",height=" + MaxH + ",top=10,left=" + PosX;
else
str_tmp = str_tmp + ",width=" + MaxW + ",height=" + MaxH + ",top=10,left=" + PosX;
window.open(Url, TitleStr, str_tmp);
}
function OpenDialog(Url, MaxW, MaxH)
{
PosX = window.screen.width / 2 - MaxW / 2;
PosY = window.screen.height / 2 - MaxH / 2;
str_tmp = "edge: Raised; center: Yes; help: Yes; resizable: Yes; status: No;"
str_tmp = str_tmp + "dialogWidth=" + MaxW + "px;dialogHeight=" + MaxH + "px;dialogTop=" + PosY + "px;dialogLeft=" + PosX + "px";
return window.showModalDialog(Url, "", str_tmp);
}
function vConfirm()
{
if (((window.event.ctrlKey) && (window.event.keyCode==78)) || ((window.event.ctrlKey) && (window.event.keyCode==68)) || ((window.event.ctrlKey) && (window.event.keyCode==87)) || ((window.event.ctrlKey) && (window.event.keyCode==72)) || (window.event.altKey))
{
alert("你不能使用这些功能键!!");
return false;
}
}
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
function CancelEvent()
{
event.returnValue=false;
event.cancelBubble=true;
return false;
}
function PromptWrite()
{
document.write('<DIV id="DivPrompt" style="DISPLAY: none; WIDTH:200px; HEIGHT:70px; Z-INDEX: 100; TOP: 1px; LEFT: 1px; POSITION: absolute;">');
document.write('<table width="200" border="0" cellspacing="0" cellpadding="0" align="center">');
document.write('<tr align="center">');
document.write('<td><img src="../images/cupq.gif" width="48" height="45"></td>');
document.write('</tr>');
document.write('<tr align="center">');
document.write('<td> </td>');
document.write('</tr>');
document.write('<tr align="center">');
document.write('<td class="p10_black">正在处理数据,请稍候 ......</td>');
document.write('</tr>');
document.write('</table>');
document.write('</DIV>');
}
function PromptOfferSet()
{
document.all.DivPrompt.style.left=(Math.round((document.body.clientWidth-200)/2)).toString()+"px";
document.all.DivPrompt.style.top=(Math.round((document.body.clientHeight-70)/2)).toString()+"px";
}
function PromptShow()
{
FlagSubmit = true;
document.all.DivPrompt.style.display = "block";
document.all.DivProcess.style.display = "none";
}
function fnPreHandle(frmName)
{
var iCount;
var strData;
var iMaxChars = 50000;
var iBottleNeck = 200000;
var frmName = eval(frmName);
strData = two_iframe.document.all.tbContentElement.DocumentHTML;
begin = strData.search("<BODY>");
end = strData.search("</BODY>");
strData = strData.substring(begin + 6, end);
//strData = document.all.special_content.value;
if (strData.length > 300000)
{
alert("您要发布的文章超过300K字节,不能发布!\n建议您拆分为几部分分别发布。")
return(0);
}
if (strData.length > iBottleNeck)
{
if (confirm("您要发布的文章太长,建议您拆分为几部分分别发布。\n如果您坚持提交,注意需要较长时间才能提交成功。\n\n是否坚持提交?") == false)
return(0);
}
iCount = parseInt(strData.length / iMaxChars) + 1;
strHTML = "<input type=hidden name=hdnCount value=" + iCount + ">";
for (var i = 1; i <= iCount; i++)
{
strHTML = strHTML + "\n" + "<input type=hidden name=hdnBigField" + i + ">";
}
document.all.divHidden.innerHTML = strHTML;
for (var i = 1; i <= iCount; i++)
{
frmName.elements["hdnBigField" + i].value = strData.substring((i - 1) * iMaxChars, i * iMaxChars);
}
//document.all.special_content.value = "";
return(1);
}
function Ltrim(instr)
{
var str = instr + "";
if (str.length == 0)
return str;
var i = 0;
while ((i < str.length) && (str.substring(i, i + 1) == " ") && (i < 2000)) i++;
return str.substring(i, str.length);
}
function Rtrim(str)
{
var instr = str + "";
var last_space;
var ret;
last_space = instr.length;
var loop=0;
while ((instr.charAt( last_space - 1 ) == " " ) && (last_space > 0) && (loop < 2000))
{
loop ++;
last_space --;
}
if (last_space == 0)
return ""
else
return instr.substring(0, last_space);
}
function Trim(str)
{
return Rtrim(Ltrim(str));
}
function isEmail(tmp_str)
{
var PatternStr = /^\w+\@\w+(\.\w+){1,3}$/;
if (PatternStr.test(tmp_str))
return true;
return false;
}
function isNumeric(tmp_str)
{
var PatternStr = /(^-?\d\d*$)/;
if (PatternStr.test(tmp_str))
return true;
return false;
}
function PageClick(option)
{
parent.fratwo.cols = "0,*"
if (option == "1")
{
parent.parent.main_iframe.buttom.State_2.innerText = "个人助理-->我的通讯录";
parent.parent.main_iframe.buttom.document.all.menuno.value = "42";
this.location = "../address_list/address_list.asp";
}
if (option == "2")
{
parent.parent.main_iframe.buttom.State_2.innerText = "个人助理-->专有信息";
parent.parent.main_iframe.buttom.document.all.menuno.value = "44";
this.location = "../special/special.asp";
}
if (option == "3")
{
parent.parent.main_iframe.buttom.State_2.innerText = "个人助理-->我的提醒夹";
parent.parent.main_iframe.buttom.document.all.menuno.value = "45";
this.location = "../reminder/reminder.asp";
}
if (option == "4")
{
parent.parent.main_iframe.buttom.State_2.innerText = "个人助理-->我的文件夹";
parent.parent.main_iframe.buttom.document.all.menuno.value = "46";
this.location = "../myfolder/myfolder.asp";
}
if (option == "5")
{
parent.parent.main_iframe.buttom.State_2.innerText = "个人助理-->个人资料";
parent.parent.main_iframe.buttom.document.all.menuno.value = "41";
this.location = "../personal/personal.asp";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -