$auth = pdo_fetch('select * from ' .tablename('wc_auth_record'). " where uniacid=:uniacid and authkey=:authkey",array(':uniacid'=>$_W['uniacid'],':authkey'=>$authkey));
return $callback.'('.json_encode($auth).')';
}
复制代码
发起JSONP请求的html端JS代码:
<script>
$(document).ready(function(){
$('.btn').click(function(){
var authkey = $.trim($("input[name='authkey']").val());