⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 js.js

📁 极限网络智能办公系统—MYOA26—100%—源程序。
💻 JS
📖 第 1 页 / 共 2 页
字号:
//<SCRIPT LANGUAGE="JavaScript" SRC="../js/js.js"></SCRIPT>
///////////////////  开新窗口函数,
////调用方法    事件如(href,OnClick)="javascript:openwd('query_one.asp?user_no=<%=rs("user_no")%>','query',',10,450,400')"
var newWindow = null
        function OpenWind(fileName,windowName,theTop,theLeft,theWidth,theHeight)  //再次点击时不刷新
        {
                if (! newWindow || newWindow.closed)
                {
                        newWindow=window.open(fileName,windowName,"toolbar=0,location=0,directories=0,status=0,menubar=0,top="+theTop+",left="+theLeft+",scrollbars=0,width="+theWidth+",height="+theHeight);
                }else	{
                        newWindow.focus();
                }

        }

        function OpenWin(fileName,windowName,theTop,theLeft,theWidth,theHeight)//再次点击时刷新
        {
                newWindow=window.open(fileName,windowName,"toolbar=0,location=1,directories=0,status=0,menubar=0,top="+theTop+",left="+theLeft+",scrollbars=0,width="+theWidth+",height="+theHeight);
                newWindow.focus();
        }

//弹出提示信息函数
        var MessageBox
        var step=1
        var timer
        var pause=0

        function WaitMsg(ThisForm,Msg)
        {
                var f = ThisForm;
                     f.elements["submit1"].disabled=true;  //为什么没效果?
                MessageBox = window.open("", "", "width=150,height=1,top=200,left=100");
                MessageBox.document.open();
                MessageBox.document.write("<html><title>信息提示</title><head><SCRIPT LANGUAGE=\"JavaScript\">");
                MessageBox.document.write("var down;");
                MessageBox.document.write("var sec;");
                MessageBox.document.write("function Down() {");
                MessageBox.document.write("sec=6;");
                MessageBox.document.write("DownRepeat('form1'); }");
                MessageBox.document.write("function DownRepeat(FormName) {");
//		MessageBox.document.write("document.form1.bt.focus();");
                MessageBox.document.write("sec--;");
                MessageBox.document.write("document.forms[FormName].bt.value=sec+'秒后自动关闭';");
//		MessageBox.document.write("	opener.location.reload(); ");
                MessageBox.document.write("if(sec==0) window.close();");
                MessageBox.document.write("else down=setTimeout(\"DownRepeat('form1')\",1000); }");
                MessageBox.document.write("</SCRIPT>");
                MessageBox.document.write("</head><body text=#FF00FF bgcolor=#FFFFDD onload=Down();document.form1.bt.focus(); background=images/bg0.gif style=border-style:none> <center><font style=FONT-SIZE:9pt>"+Msg+"</font><FORM METHOD=POST  Name=form1><input type=button style=BACKGROUND:#FFFFDD;BORDER-COLOR:#FF0000;color:#FF00FF; name=bt onclick=javascript:window.close()></FORM></center></body></html>");
                MessageBox.document.close();
//		MessageBox.focus();
//		movewindow()
        }
        //弹出提示信息函数



        function MsgBox(Msg)
        {
                MessageBox = window.open("", "", "width=150,height=1,top=200,left=100");
                MessageBox.document.open();
                MessageBox.document.write("<html><title>信息提示</title><head><SCRIPT LANGUAGE=\"JavaScript\">");
                MessageBox.document.write("var down;");
                MessageBox.document.write("var sec;");
                MessageBox.document.write("function Down() {");
                MessageBox.document.write("sec=6;");
                MessageBox.document.write("DownRepeat('form1'); }");
                MessageBox.document.write("function DownRepeat(FormName) {");
//		MessageBox.document.write("document.form1.bt.focus();");
                MessageBox.document.write("sec--;");
                MessageBox.document.write("document.forms[FormName].bt.value=sec+'秒后自动关闭';");
//		MessageBox.document.write("	opener.location.reload(); ");
                MessageBox.document.write("if(sec==0) window.close();");
                MessageBox.document.write("else down=setTimeout(\"DownRepeat('form1')\",1000); }");
                MessageBox.document.write("</SCRIPT>");
                MessageBox.document.write("</head><body text=#FF00FF bgcolor=#FFFFDD onload=Down();document.form1.bt.focus(); background=images/bg0.gif style=border-style:none> <center><font style=FONT-SIZE:9pt>"+Msg+"</font><FORM METHOD=POST  Name=form1><input type=button style=BACKGROUND:#FFFFDD;BORDER-COLOR:#FF0000;color:#FF00FF; name=bt onclick=javascript:window.close()></FORM></center></body></html>");
                MessageBox.document.close();
//		MessageBox.focus();
//		movewindow()
        }
        //弹出提示信息函数

        //倒计时
        var down;
        var sec;
        function Down()
        {
                sec=6;
                DownRepeat('form1');
        }
        function DownRepeat(FormName)
        {
                sec--;
                document.forms[FormName].bt.value=sec;
                if(sec==0) window.close();
                else down=setTimeout("DownRepeat('form1')",1000);
        }
        //倒计时

        //移动窗口
        function movewindow()
        {
                if (i_left<=screen.width)
                {
                        MessageBox.moveTo(i_left,i_top)
                        i_left+=step
                        timer= setTimeout("movewindow()",pause)
                }else
                {
                        MessageBox.close()
            i_left=screen.width/1.3
                }
        }
        //移动窗口

///////////////////复选框全部选定与取消
                function SelectAll(FormName)
                {

                  for (var i=0;i<document.forms[FormName].elements.length; i++)
                  {
                  var e=document.forms[FormName].elements[i];
                  e.checked=document.forms[FormName].selectstatus.checked;
                  }

                }

        ///////////////////
        //功能:退出或删除前提示一下
        function DelQuit(Msg,Url)
        {
                if(confirm(Msg))
                {
                        location.href=Url
                }else
                {
                        history.go(1)
                }
        }




/////////////////// 上下翻页
/////////参数说明:page       要显示第几页
/////////参数说明:FormName   表单名
                function PageUpDown(FormName,Page)
                {
                  if (Page!=null){
                        document.forms[FormName].Page.value=Page;

                        }
                        document.forms[FormName].submit();
                }

                function GoPage(FormName,MaxPage)
                {
                        if ( isNaN(FormName.Page.value) )
                                {
                                alert("页面必须为数字!");
                                FormName.Page.focus();
                                return (false);
                                }
                        if (FormName.Page.value=="")
                                {
                                alert("页码输入不能为空,请重新输入。");
                                FormName.Page.focus();
                                return (false)
                                }
                        if(FormName.Page.value>=1&&FormName.Page.value<=MaxPage)
                        {
//			    FormName.Page.value=FormName.Page.value;
                            PageUpDown(FormName,FormName.Page.value)
                        }else
                       {
                                alert("页码超出范围");
                                return false;
//	            history.go(-1)

                        }

                }


                function RefuseEnter()
                {
                        alert("请点击GO!");
//            document.gopage.bt.focus()
//            history.go(-1)
                        return (false);
                }

/////////////////// 上下翻页用于 同一页面include另一个FORM

                function PageUpDown_Form1(Page,SearchWord)
                {
                  if (Page!=null){
                        document.forms[1].Page.value=Page;

                        }
                  if (SearchWord!=null){
                        document.forms[1].SearchWord.value=SearchWord;
                        }
                        document.forms[1].submit();
                }

                function MessageBox(Msg)
                {
                  alert(Msg);
                  history.go(-1);
                }


function SetDateOnload(FormName,FormName2,sYear,sMonth)
{
        todayDate = new Date();
        date = todayDate.getDate();
        month= todayDate.getMonth() +1;
        year= todayDate.getYear();
        day= todayDate.getDay();
        document.forms(FormName).elements(sYear).value=year;
        document.forms(FormName).elements(sMonth).value=month;

}

                function SetDateOnSubmit(FormName)
                {
                        var BN=document.forms[FormName].sBeginNo.value;
                        var EN=document.forms[FormName].sEndNo.value;
                        if ( isNaN(BN))
                                {
                                alert("起始号码必须为数字!");
                                document.forms[FormName].sBeginNo.value="";
                                document.forms[FormName].sBeginNo.focus();
                                return (false);
                                }
                        if ( isNaN(EN))
                                {
                                alert("结束号码必须为数字!");
                                document.forms[FormName].sEndNo.value="";
                                document.forms[FormName].sEndNo.focus();
                                return (false);
                                }
            if(BN.length!=0)
                        {
                          if (BN.length!=11&&BN.length!=8)
                                    {
                                    alert("起始号码位数不对!");
                                        document.forms[FormName].sBeginNo.value="";
                                    document.forms[FormName].sBeginNo.focus();
                                    return (false);
                                     }
                        }

            if(EN.length!=0)
                        {
                          if (EN.length!=11&&EN.length!=8)
                                    {
                                    alert("结束号码位数不对!");
                                        document.forms[FormName].sEndNo.value="";
                                        document.forms[FormName].sEndNo.focus();
                                    return (false);
                                     }
                        }

            document.forms[FormName].submit();
/*
                        if (FormName.sMonth.value=="")
                                {
                                alert("输入不能为空,请重新输入。");
                                FormName.sMonth.focus();
                                return (false)
                                }

⌨️ 快捷键说明

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