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

📄 jsutil.cs

📁 HR系统,人事,能力素质,考勤,薪资等,AJAX,ASP.NET
💻 CS
📖 第 1 页 / 共 2 页
字号:
            string text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void OpenDialogPage(Page page)
        {
            string text1 = "<script language=javascript>\n";
            text1 = text1 + "function returnValues(values){window.returnValue=values;window.close();}\n ";
            text1 = text1 + "</script>";
            string text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void OpenDialogRet(Page page, string URL, int Width, int Height, string controlID, string FormName, string retValues)
        {
            string text1 = "<script for=window event=onload language=javascript>\n";
            string text3 = text1;
            text1 = string.Concat(new string[] { text3, "var ", retValues, "=window.showModalDialog(\"", URL, "\",null,\"", string.Format("dialogWidth:{0}px;dialogHeight:{1}px;help:no;unadorned:yes;resizable:yes;status:no", Width, Height), "\");\n" });
            text1 = text1 + "\tif (" + retValues + "!=null)\n";
            text1 = text1 + "\t{\n";
            text3 = text1;
            text1 = string.Concat(new string[] { text3, FormName, ".", controlID, ".value=", retValues, ";\n" });
            text1 = text1 + "\t}\n";
            text1 = text1 + "</script>";
            string text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsClientScriptBlockRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterClientScriptBlock(text2 + num1.ToString(), text1);
        }

        public static void OpenIEWindow(Page page, string URL, int Width, int Height, int Left, int Top)
        {
            string text2 = string.Format("width={0},height={1},left={2},top={3},directories=no,location=no,menubar=no,status=no,toolbar=no,resizable=yes", new object[] { Width, Height, Left, Top });
            string text1 = "<script language=javascript>\n";
            string text3 = text1;
            text1 = string.Concat(new string[] { text3, "\twindow.open(\"", URL, "\",null,\"", text2, "\");\n" });
            text1 = text1 + "</script>";
            text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void OpenIEWindowCenter(Page page, string URL, int Width, int Height)
        {
            string text2 = string.Format("width={0},height={1},directories=no,scrollbars=yes,location=no,menubar=no,status=no,toolbar=no,resizable=yes", Width, Height);
            string text1 = "<script language=javascript>\n";
            text1 = text1 + "\tvar sFeatures=\"" + text2 + "\";\n";
            text1 = text1 + "\tsFeatures+=\",left=\"+(screen.availWidth-12-" + Width.ToString() + ")/2;\n";
            text1 = text1 + "\tsFeatures+=\",top=\"+(screen.availHeight-" + Height.ToString() + ")/2;\n";
            text1 = text1 + "\twindow.open(\"" + URL + "\",\"_blank\",sFeatures);\n";
            text1 = text1 + "</script>";
            text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void OpenIEWindowCenter1(Page page, string URL, int Width, int Height)
        {
            string text2 = string.Format("width={0},height={1},directories=no,scrollbars=yes,location=no,menubar=yes,status=no,toolbar=no,resizable=yes", Width, Height);
            string text1 = "<script language=javascript>\n";
            text1 = text1 + "\tvar sFeatures=\"" + text2 + "\";\n";
            text1 = text1 + "\tsFeatures+=\",left=\"+(screen.availWidth-12-" + Width.ToString() + ")/2;\n";
            text1 = text1 + "\tsFeatures+=\",top=\"+(screen.availHeight-" + Height.ToString() + ")/2;\n";
            text1 = text1 + "\twindow.open(\"" + URL + "\",\"_blank\",sFeatures);\n";
            text1 = text1 + "</script>";
            text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void OpenIEWindowCenter2(Page page, string URL, int Width, int Height)
        {
            string text2 = string.Format("width={0},height={1},directories=no,scrollbars=yes,location=no,menubar=yes,status=no,toolbar=no,resizable=yes", Width, Height);
            string text1 = "<script language=javascript>\n";
            text1 = text1 + "\tvar sFeatures=\"" + text2 + "\";\n";
            text1 = text1 + "\tsFeatures+=\",left=\"+(screen.availWidth-12-" + Width.ToString() + ")/2;\n";
            text1 = text1 + "\tsFeatures+=\",top=\"+(screen.availHeight-" + Height.ToString() + ")/2;\n";
            text1 = text1 + "\twindow.open(\"" + URL + "\",\"_parent\",sFeatures);\n";
            text1 = text1 + "</script>";
            text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void OpenIEWindowRight(Page page, string URL, int Width)
        {
            string text2 = string.Format("width={0},directories=no,scrollbars=yes,location=no,menubar=no,status=no,toolbar=no,resizable=yes", Width);
            string text1 = "<script language=javascript>\n";
            text1 = text1 + "\tvar sFeatures=\"" + text2 + "\";\n";
            text1 = text1 + "\tsFeatures+=\",left=\"+(screen.availWidth-12-" + Width.ToString() + ");\n";
            text1 = text1 + "\tsFeatures+=\",top=0\";\n";
            text1 = text1 + "\tsFeatures+=\",height=\";\n";
            text1 = text1 + "\tsFeatures+=(screen.availHeight-30);\n";
            text1 = text1 + "\tsFeatures+=\";\";\n";
            text1 = text1 + "\twindow.open(\"" + URL + "\",\"_blank\",sFeatures);\n";
            text1 = text1 + "</script>";
            text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void OpenIEWindowRight(Page page, string URL, int Width, int Height)
        {
            string text2 = string.Format("width={0},height={1},directories=no,scrollbars=yes,location=no,menubar=no,status=no,toolbar=no,resizable=yes", Width, Height);
            string text1 = "<script language=javascript>\n";
            text1 = text1 + "\tvar sFeatures=\"" + text2 + "\";\n";
            text1 = text1 + "\tsFeatures+=\",left=\"+(screen.availWidth-12-" + Width.ToString() + ");\n";
            text1 = text1 + "\tsFeatures+=\",top=\"+(screen.availHeight-" + Height.ToString() + ")/2;\n";
            text1 = text1 + "\twindow.open(\"" + URL + "\",\"_blank\",sFeatures);\n";
            text1 = text1 + "</script>";
            text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void OpenModelessDialog(Page page, string URL, int Width, int Height)
        {
            string text1 = "<script language=javascript>\n";
            string text3 = text1;
            text1 = string.Concat(new string[] { text3, "\twindow.showModelessDialog(\"", URL, "\",null,\"", string.Format("dialogWidth:{0}px;dialogHeight:{1}px;help:no;unadorned:yes;resizable:yes;status:no", Width, Height), "\");\n" });
            text1 = text1 + "</script>";
            string text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void RegisterClientScriptBlock(Page page, string script)
        {
            string text1 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsClientScriptBlockRegistered(text1 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterClientScriptBlock(text1 + num1.ToString(), script);
        }

        public static void RegisterStartupScript(Page page, string script)
        {
            string text1 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text1 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text1 + num1.ToString(), script);
        }

        public static void SubmitForm(Page page)
        {
            string text1 = "<script language=javascript>\n";
            text1 = text1 + "\tdocument.forms[0].submit();\n";
            text1 = text1 + "</script>";
            string text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void SubmitForm(Page page, string FormName)
        {
            string text1 = "<script language=javascript>\n";
            text1 = text1 + "\t" + FormName + ".submit();\n";
            text1 = text1 + "</script>";
            string text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

        public static void SubmitForm(Page page, string FormName, string action)
        {
            string text1 = "<script language=javascript>\n";
            string text3 = text1;
            text1 = string.Concat(new string[] { text3, "\t", FormName, ".action=\"", action, "\";\n" });
            text1 = text1 + "\t" + FormName + ".submit();\n";
            text1 = text1 + "</script>";
            string text2 = DateTime.Now.ToString();
            int num1 = 0;
            while (num1 < 0x2710)
            {
                if (!page.IsStartupScriptRegistered(text2 + num1.ToString()))
                {
                    break;
                }
                num1++;
            }
            page.RegisterStartupScript(text2 + num1.ToString(), text1);
        }

    }
}

⌨️ 快捷键说明

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