当前位置: 代码迷 >> PHP >> 关与AJAX json html有关问题
  详细解决方案

关与AJAX json html有关问题

热度:66   发布时间:2016-04-28 17:59:10.0
关与AJAX json html问题
不是编码问题

function getPassWord() {
$.jBox("get:__APP__/member/common/getpassword/", {          //getpassword .html 
title: "找回密码",
width: "auto",
buttons: {'发送邮件':'jfun_dogetpass()','关闭': true }
});   
}

getpassword.html内容:

<table style=" margin:10px; font-size:12px; text-align:left; line-height:24px;" id="tips">
<tbody>
<tr>
<td>用户名/邮箱:</td>
</tr>
<tr>
<td style=" padding-top:10px;"><input type="text" id="emailname" style="width:200px; height:25px; line-height:25px" /></td>
</tr>
<tr>
<td>请输入您在{$glo.web_name}的用户名或邮件,我们会向您的邮箱发送一个重置密码的链接<br />请您按邮件中提示重置密码。</td>
</tr>
</tbody></table>


执行上面的函数得到的是:


可能是json 问题
要怎么把它变成正常网页

------解决思路----------------------
js 代码:
变量 = eval('(' + 返回串 +')')
------解决思路----------------------
我记得我出现这种情况都是某个标签没有闭合导致的 好好查下
------解决思路----------------------
试试在php端使用 
json_decode 或 json_encode
  相关解决方案