由网友(做个废柴,保持可爱)分享简介:我用ajax jquery的方法传递价值的服务器,但我的问题是,我使用了一些值单引号 ,这是给我的错误,i am using ajax jquery method to pass value to server, but my problem is i am using some value with single...
我用ajax jquery的方法传递价值的服务器,但我的问题是,我使用了一些值单引号
,这是给我的错误,
i am using ajax jquery method to pass value to server, but my problem is i am using some value with single quote
'
and it's give me error ,
ClientManager =客户经理的< ==我在这里传递值'(单引号)
ClientManager = "Client's Manager " <== here i am passing value with ' (single quote)
data: "{projectSoid': '" + ProjectId + "','startDate': '" + StartDate + "','endDate': '" + EndDate + "','clientManager': '" + ClientManager + "'}",
和阿贾克斯jQuery的方法,错误给我的错误: -
and ajax jquery method, Error give me error :-
消息:无效的对象是传入的,':'或'}'的预期。 ........
侵染我希望所有的领域允许以'(单引号)
infect i want all fields allows with ' (single quote)
什么是passdata的最佳soulution的jQuery的Ajax方法的数据:{
what's the best soulution to passdata as jQuery Ajax Methods's data : {
推荐答案
尝试定义对象文本,而不是连接字符串。
Try defining an object literal, instead of concatenating a String.
data: {
"projectSoid": ProjectId,
"startDate": StartDate,
"endDate": EndDate,
"clientManager": ClientManager
},
//other entries
相关推荐
最新文章