尝试重定向到URL时出现无效或意外的令牌

时间:2017-12-03 18:39:05

标签: php jquery

HTML:

<div>
<button onclick="$.redirect('<?php echo $authResult->authref; ?>', '<?php echo json_encode($rs); ?>');" >Allow?</button>

PHP代码输出是:

json_encode($rs) : {"status":"OK","result":{"username":"Admin","name":"\u0631\u0627\u0645\u06cc\u0646","facebook":"Artam"}}

$authResult->authref : http://mywebsite.com/

ERROR:

Uncaught SyntaxError: Invalid or unexpected token

0 个答案:

没有答案