Jquery Ajax 调用后台方法
2012-08-29 17:25
197 查看
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();
}
});
});
});
function 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
{
alert("This window is open !");
}
}
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");
}
}
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();
}
});
});
});
function 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
{
alert("This window is open !");
}
}
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");
}
}
相关文章推荐
- JQuery Ajax实现调用后台方法
- jQuery AJAX实现调用页面后台方法
- 前台JS(jquery ajax)调用后台方法实现无刷新级联菜单示例
- jquery ajax调用后台方法返回json数据转自http://www.cnblogs.com/xiaoxi/archive/2011/03/31/2000803.html
- jQuery AJAX实现调用页面后台方法
- jQuery AJAX实现调用页面后台方法
- jQuery AJAX实现调用页面后台方法
- JQuery Ajax调用asp.net后台方法
- ASP.NET jQuery 食谱23 (jQuery AJAX实现调用页面后台方法和web服务定义的方法)
- Jquery Ajax调用asp.net后台方法
- jQuery AJAX实现调用页面后台方法和web服务定义的方法分享
- JQuery Ajax调用asp.net后台方法
- asp.net如何在前台利用jquery Ajax调用后台方法
- jQuery AJAX实现调用页面后台方法
- 前台JS(jquery ajax)调用后台方法实现无刷新级联菜单示例
- jQuery AJAX实现调用页面后台方法
- jQuery ajax调用本页面后台方法Demo
- Jquery ajax调用后台aspx后台文件方法(不是ashx)
- JQuery Ajax调用asp.net后台方法
- Jquery Ajax调用ASP.NET 后台页面方法