YKT_Common/Js.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Web;
using System.Text;
namespace YKT_Common
{
/// <summary>
/// 客户端脚本输出
/// </summary>
public class Js
{
/// <summary>
/// 弹出信息。并跳转指定页面。
/// </summary>
/// <param name="message"></param>
/// <param name="toURL"></param>
public static void AlertAndRedirect(string message, string toURL)
{
string js = "<script language=javascript>alert('{0}');window.location.replace('{1}')</script>";
HttpContext.Current.Response.Write(string.Format(js, message, toURL));
HttpContext.Current.Response.End();
}
/// <summary>
/// 弹出信息。并返回历史页面
/// </summary>
/// <param name="message"></param>
/// <param name="value"></param>
public static void AlertAndGoHistory(string message, int value)
{
string js = @"<Script language='JavaScript'>alert('{0}');
history.go({1});
</Script>";
HttpContext.Current.Response.Write(string.Format(js, message, value));
HttpContext.Current.Response.End();
}
/// <summary>
/// 直接跳转到指定的页面
/// </summary>
/// <param name="toUrl"></param>
public static void Redirect(string toUrl)
{
string js = @"<script language=javascript>window.location.replace('{0}')</script>";
HttpContext.Current.Response.Write(string.Format(js, toUrl));
}
/// <summary>
/// 弹出信息 并指定到父窗口
/// </summary>
/// <param name="toUrl"></param>
public static void AlertAndParentUrl(string message, string toURL)
{
string js = "<script language=javascript>alert('{0}');window.top.location.replace('{1}')</script>";
HttpContext.Current.Response.Write(string.Format(js, message, toURL));
}
/// <summary>
/// 返回到父窗口
/// </summary>
/// <param name="ToUrl"></param>
public static void ParentRedirect(string ToUrl)
后面还有 29 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。