麻烦帮看一下我这个jquery ajax查询为什么总是报错
$.ajax({
type: "POST",
url: "BusinessSearchHelper.ashx",
data: { star: starTiem, end: endTiem, acc: account, type: check },
datatype: "html",
success: function(ReturnData) {
$("#showData").html(ReturnData);
},
error: function(RetrunError) {
$("#showData").html(RetrunError);
}
});
BusinessSearchHelper.ashx里面的代码
using System;
using System.Web;
using STBKen.BLL;
using STBKen.Entity;
using System.Text;
using System.Collections.Generic;
public class BusinessSearchHelper : IHttpHandler {
string starTime;
string endTime;
string account;
string type;
BLLOperator bll = new BLLOperator();
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/html";
starTime = context.Request.Params["star"].ToString().Trim();
endTime = context.Request.Params["end"].ToString().Trim();
account = context.Request.Params["acc"].ToString().Trim();
type = context.Request.Params["type"].ToString().Trim();
List<Entity_CLP> LSclp = bll.SearchCPL_BLL(starTime,endTime,account,0,20);
StringBuilder sb = new StringBuilder();
foreach(Entity_CLP clp in LSclp)
{
sb.Append("<Table>");
sb.Append("<tr>");
sb.Append("<td>"+clp.Account+"</td>");
sb.Append("<td>" + clp.Clpno + "</td>");
sb.Append("<td>" + clp.La_no + "</td>");
sb.Append("<td>" + clp.Recla_date + "</td>");
sb.Append("<td>" + clp.Xingqi + "</td>");
sb.Append("<td>" + clp.Client + "</td>");
sb.Append("<td>" + clp.So_no + "</td>");
sb.Append("<td>" + clp.Rec_date + "</td>");
sb.Append("<td>" + clp.XingqiSO + "</td>");
sb.Append("<td>" + clp.Tocbm + "</td>");
sb.Append("</tr>");
sb.Append("</Table>");
}
context.Response.Write(sb.ToString());
}
public bool IsReusable {
get {
return false;
}
}
type: "POST",
url: "BusinessSearchHelper.ashx",
data: { star: starTiem, end: endTiem, acc: account, type: check },
datatype: "html",
success: function(ReturnData) {
$("#showData").html(ReturnData);
},
error: function(RetrunError) {
$("#showData").html(RetrunError);
}
});
BusinessSearchHelper.ashx里面的代码
using System;
using System.Web;
using STBKen.BLL;
using STBKen.Entity;
using System.Text;
using System.Collections.Generic;
public class BusinessSearchHelper : IHttpHandler {
string starTime;
string endTime;
string account;
string type;
BLLOperator bll = new BLLOperator();
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/html";
starTime = context.Request.Params["star"].ToString().Trim();
endTime = context.Request.Params["end"].ToString().Trim();
account = context.Request.Params["acc"].ToString().Trim();
type = context.Request.Params["type"].ToString().Trim();
List<Entity_CLP> LSclp = bll.SearchCPL_BLL(starTime,endTime,account,0,20);
StringBuilder sb = new StringBuilder();
foreach(Entity_CLP clp in LSclp)
{
sb.Append("<Table>");
sb.Append("<tr>");
sb.Append("<td>"+clp.Account+"</td>");
sb.Append("<td>" + clp.Clpno + "</td>");
sb.Append("<td>" + clp.La_no + "</td>");
sb.Append("<td>" + clp.Recla_date + "</td>");
sb.Append("<td>" + clp.Xingqi + "</td>");
sb.Append("<td>" + clp.Client + "</td>");
sb.Append("<td>" + clp.So_no + "</td>");
sb.Append("<td>" + clp.Rec_date + "</td>");
sb.Append("<td>" + clp.XingqiSO + "</td>");
sb.Append("<td>" + clp.Tocbm + "</td>");
sb.Append("</tr>");
sb.Append("</Table>");
}
context.Response.Write(sb.ToString());
}
public bool IsReusable {
get {
return false;
}
}
...全文
相关推荐
ajax获取json数据使用jquery分页插件显示
插件下载地址http://www.jq22.com/jquery-plugins分页-2-jq下载的插件用自带的数据是可以的,但是采用ajax获取的json数据的时候会报错,所以我对插件进行了修改,成
IE8 jquery ajax获取静态资源报错TypeError 拒绝访问
在IT行业中,jQuery是一个广泛使用的JavaScript库,它极大地简化了DOM操作、事件处理以及Ajax交互。
jquery 重写 ajax提交并判断权限后 使用load方法报错解决方法
`load`等依赖`ajax`方法的jQuery函数时,因为`ajax`没有返回`Promise`对象而报错:“Uncaught TypeError: Cannot call method 'done'
你的jquery ajax无效和你的jquery引入路径有关
在 JavaScript 中,`$` 符号通常作为 jQuery 的简写,如果浏览器报错说 `$` 无效,这通常是由于 jQuery 未加载或加载失败导致的。
解决Ajax方式上传文件报错"Uncaught TypeError: Illegal invocation"
当其值为true时,jQuery会尝试将data选项中的对象转换为查询字符串,以便与默认的内容类型"application/x-www-form-urlencoded"匹配。


