Common/JsHelper.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web ;
namespace Common
{
public class JsHelper
{
private static string ScriptTag { get { return "<script type='text/javascript'>alert('{0}');{1}{2}{3}</script>"; } }
private static string WindowCloseStr {
get { return "window.close();"; }
}
private static string WindowCloseParentStr {
get { return "window.opener.close();window.opener.opener = null; "; }
}
private static string GoToStr {
get { return "window.history.go({0});"; }
}
private static string GoToTargetUrl {
get { return "window.location.href='{0}';"; }
}
#region 显示消息
/// <summary>
/// 显示消息,但先出现空白页
/// </summary>
/// <param name="msg"></param>
public static void wShowMessage(string msg,System.Web.UI.Page page)
{
ShowMessage(msg,page,true);
}
public static void ShowMessage(string msg, System.Web.UI.Page page)
{
ShowMessage(msg, page, false);
}
public static void ShowMessage(string msg, System.Web.UI.Page page, bool isWhiteBackground)
{
string scriptStr= string.Format(ScriptTag, msg, string.Empty, string.Empty, string.Empty);
ResponseWriteScript(isWhiteBackground,page,scriptStr);
}
#endregion
#region 显示消息并且控制是否关闭窗口
public static void wShowMessage(string msg, bool isClose,System.Web.UI.Page page)
{
ShowMessage(msg,isClose,page,true);
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
