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