Javascript error : Uncaught SyntaxError: Unexpected token ILLEGAL

What is wrong with the following ??

var signup_data = "{'ut': 'T','fn': 'Roy','ln': 'M J','el': 'roy.mj@experionglobal.com','dob': '1988-12-05','pd': '123','did': '3456789-fghjkl','dt': 'I','dtn': 'EA2B6A87-2145-4BA2','ky': 'MTIOS','av': '1.0','gr': 'F','rs': 1,'str': 'street','cy': 'city','st': 1,'co': 1,'zc': '895545','se': 'test@test.com','ph1': '2587456874','ph2': 5874587558'}";

Im gettting an Uncaught SyntaxError: Unexpected token ILLEGAL in the browser error console.. Im trying to send this as a string instead of json.


Remove the last '

'}";

Make it like this...

var signup_data = "{'ut': 'T','fn': 'Roy','ln': 'M J','el': 'roy.mj@experionglobal.com','dob': '1988-12-05','pd': '123','did': '3456789-fghjkl','dt': 'I','dtn': 'EA2B6A87-2145-4BA2','ky': 'MTIOS','av': '1.0','gr': 'F','rs': 1,'str': 'street','cy': 'city','st': 1,'co': 1,'zc': '895545','se': 'test@test.com','ph1': '2587456874','ph2': 5874587558}";
链接地址: http://www.djcxy.com/p/45980.html

上一篇: 未捕获的SyntaxError:意外的令牌非法

下一篇: Javascript错误:未捕获SyntaxError:意外的令牌非法