首页 课程 师资 教程 报名

Ajax调用后台方法

  • 2022-05-10 10:52:05
  • 974次 星辉

星辉小编来告诉大家Ajax调用后台方法

jQuery(function () { jQuery("#fff").click(function (e) { e.preventDefault(); var url ='WebForm1.aspx' + "?rand=" + Math.random(); var str = "btnAjaxGet_click"; jQuery.post(url, {txtname: str}, function (data, static) { if (data = "True") {
ShowUnknowMail(); }
});
});
});
函数 ShowUnknowMail()
{
if (!isWinExist("MailForUnknow"))
{
contentWin = new HWWeb("MailForUnknow");
contentWin.showWindow({ title:'', themeName: "alphacube", url:'../PlaceOrder/MailForUnknow.aspx', top: 200, left:220, width: 550, height: 300});
}
else
{ alrt("这个窗口打开了!"); } }
if (!string.IsNullOrEmpty(Request["txtname"])) { string name = Request["txtname"]; if (name == "btnAjaxGet_click") { Response.Write("True");//这是输出返回值 data=true//ajaxValue(); int i = BllLibrary.ajax();//操作数据库 } else { Response.Write("False"); } }

 

选你想看

你适合学Java吗?4大专业测评方法

代码逻辑 吸收能力 技术学习能力 综合素质

先测评确定适合在学习

在线申请免费测试名额
价值1998元实验班免费学
姓名
手机
提交