码迷,mamicode.com
首页 > 其他好文 > 详细

后台提示

时间:2016-07-13 00:56:20      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:

      /// <summary>
        /// 提示  民工考勤提示
        /// </summary>
        /// <param name="msg">提示内容</param>
        /// <param name="url">跳转url</param>
        /// <param name="timeOut">延迟</param>
        /// <returns></returns>
        public static string AlertTip(string msg="",string url="",int timeOut=2)
        {

            var result = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><script src=‘/content/js/jquery-1.9.1.min.js‘></script><link href=‘/content/css/artDialog.css‘ rel=‘stylesheet‘ type=‘text/css‘ /> <script src=‘/content/js/jquery.artDialog.js‘ type=‘text/javascript‘></script>";
            var info = string.Format(" artDialog.tips(\"{0}\");", msg);
            if (!string.IsNullOrEmpty(url))
            {
                info += string.Format(" setTimeout(function () {{  location.href = \"{0}\"; }}, 1000*{1})",url,timeOut);
            }
            result += string.Format("<script type=\"text/javascript\">$(function () {{{0}}})</script>", info);
            return result;
        }

后台提示

标签:

原文地址:http://www.cnblogs.com/change4now/p/5665217.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!