问题描述
下面的代码即时通讯在我的解决方案中使用,但是当我在ajax调用中传递数据"参数时,即时通讯收到错误,但没有数据"参数,则工作正常.
谁能告诉我this.quick的反应出了什么问题.
var strInput =";
var strSearchType = $(''#ddnSearchType'').val();
strInput = strInput +''strSearch'':''" + strSearchType +''";
disableButtons();
//清除以前的结果
$("table#tblInfo tbody tr").remove();
//对JSON的Ajax调用
$ .ajax({
类型:"POST",
contentType:"application/json; charset = utf-8",
网址:"widgetJosn.asmx/PerformSearch",
数据:"{" + strInput +}",
dataType:"JSON",
成功:parseData,
错误:AjaxFailed
});
Hi,
the below code im using in my solution, but when i pass ''data'' parameter in ajax calling, im getting the error but without ''data'' parameter it''s working fine.
can anyone tell me whats wrong with this.quick response appreciated.
var strInput="";
var strSearchType=$(''#ddnSearchType'').val();
strInput = strInput +"''strSearch'':''"+strSearchType+"''";
disableButtons();
//Clear previous results
$("table#tblInfo tbody tr").remove();
//Ajax Call to JSON
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: ''widgetJosn.asmx/PerformSearch'',
data: "{"+strInput+"}",
dataType: "JSON",
success: parseData,
error: AjaxFailed
});
推荐答案
这篇关于通过AJAX调用Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!