//ajax请求
$.ajax({
type : "post",
url : url,
dataType : "json",
success : function(result) {
if(result.code == 0){
var dt = JSON.stringify('{"name":"上海","value":22}');
this.config.options[optionNum].data = dt;
}else{
throw new Error('selectC:下拉框获取接口异常,' + result.msg);
}
},
error:function(){
throw new Error('selectC:下拉框获取接口异常');
}
})
我是想先测试一下,直接给出json格式,好像不能呢。怎么弄啊
浏览器的

JSON
的API了解一下。