首页  ·  知识 ·  云计算
web开发中常用的、做成cs文件的js代码
佚名  http://www.cnblogs.com/hzuIT/  综合  编辑:dezai  图片来源:网络
using System;using System.Web;using System.Web.UI; namespace COCOWO.COMP{ /**//// summary&nb

using System;
using System.Web;
using System.Web.UI;

namespace COCOWO.COMP
{
    /**////


    /// 一些常用的Js调用
    /// 创建时间:2006-8-3
    /// 创建者:马先光
    ///

    public class Jscript
    {       
              
        /**////
        /// 弹出javascript小窗口
        ///

        /// 窗口信息
        public static void Alert(string message)
        {
            #region
            string js = @"";
            HttpContext.Current.Response.Write(js);
            #endregion
        }

        /**////


        /// 弹出消息框并且转向到新的URL
        ///

        /// 消息内容
        /// 连接地址
        public static void AlertAndRedirect(string message, string toURL)
        {
            #region
            string js = "";
            HttpContext.Current.Response.Write(string.Format(js, message, toURL));
            #endregion
        }
       
        /**////
        /// 回到历史页面
        ///

        /// -1/1
        public static void GoHistory(int value)
        {
            #region
            string js = @"";
            HttpContext.Current.Response.Write(string.Format(js, value));
            #endregion
        }

        /**////


        /// 关闭当前窗口
        ///

        public static void CloseWindow()
        {
            #region
            string js = @"";
            HttpContext.Current.Response.Write(js);
            HttpContext.Current.Response.End();
            #endregion
        }

        /**////


        /// 刷新父窗口
        ///

        public static void RefreshParent(string url)
        {
            #region
            string js = @"";
            HttpContext.Current.Response.Write(js);
            #endregion
        }


        /**////


        /// 打开指定大小的新窗体
        ///

        /// 地址
        ///
        ///
        /// 头位置
        /// 左位置
        public static void OpenWebFormSize(string url, int width,int heigth,int top,int left)
        {
            #region
            string js = @"";

            HttpContext.Current.Response.Write(js);
            #endregion
        }
      
       
        /**////


        /// 转向Url制定的页面
        ///

        /// 连接地址
        public static void javascriptLocationHref(string url)
        {
            #region
            string js = @"";
            js = string.Format(js, url);
            HttpContext.Current.Response.Write(js);
            #endregion
        }

        /**////


        /// 打开指定大小位置的模式对话框
        ///

        /// 连接地址
        ///
        ///
        /// 距离上位置
        /// 距离左位置
        public static void ShowModalDialogWindow(string webFormUrl, int width, int height, int top, int left)
        {
            #region
            string features = "dialogWidth:" + width.ToString() + "px"
                + ";dialogHeight:" + height.ToString() + "px"
                + ";dialogLeft:" + left.ToString() + "px"
                + ";dialogTop:" + top.ToString() + "px"
                + ";center:yes;help=no;resizable:no;status:no;scroll=yes";
            ShowModalDialogWindow(webFormUrl, features);
            #endregion
        }

        public static void ShowModalDialogWindow(string webFormUrl, string features)
        {
            string js = ShowModalDialogjavascript(webFormUrl, features);
            HttpContext.Current.Response.Write(js);
        }

        public static string ShowModalDialogjavascript(string webFormUrl, string features)
        {
            #region
            string js = @"";
            return js;
            #endregion
        }
      

    }
}

本文作者:佚名 来源:http://www.cnblogs.com/hzuIT/
CIO之家 www.ciozj.com 微信公众号:imciow
   
免责声明:本站转载此文章旨在分享信息,不代表对其内容的完全认同。文章来源已尽可能注明,若涉及版权问题,请及时与我们联系,我们将积极配合处理。同时,我们无法对文章内容的真实性、准确性及完整性进行完全保证,对于因文章内容而产生的任何后果,本账号不承担法律责任。转载仅出于传播目的,读者应自行对内容进行核实与判断。请谨慎参考文章信息,一切责任由读者自行承担。
延伸阅读