ajax获取不到ashx中的值
前台functionceshi(){$.ajax({type:"GET",url:"../../server/Ceshi.ashx",data:null,success:...
前台
function ceshi() {
$.ajax({
type: "GET",
url: "../../server/Ceshi.ashx",
data: null,
success: function (result) {
alert(result);
}
});
}
后台
<%@ WebHandler Language="C#" Class="Ceshi" %>
using System;
using System.Web;
public class Ceshi : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable {
get {
return false;
}
}
}
调试时能进入后台的 但是会出现弹出框 然后进入后台 展开
function ceshi() {
$.ajax({
type: "GET",
url: "../../server/Ceshi.ashx",
data: null,
success: function (result) {
alert(result);
}
});
}
后台
<%@ WebHandler Language="C#" Class="Ceshi" %>
using System;
using System.Web;
public class Ceshi : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable {
get {
return false;
}
}
}
调试时能进入后台的 但是会出现弹出框 然后进入后台 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询