日期:2014-05-16  浏览次数:20413 次

JSON问题
小弟想用JSON做一个表格,直接以用数据的形式读取出来,觉得这样做既能让用户观看清楚,我自己修改管理也方便清楚,例如:
[
  {
  "i": "" ,
  "d":"<div dir=\"ltr\";color:red;>123<br><br>123<br>123br><br>",
  "g": "116.387156,40.061626,0.000000",
  "n": "123",
  "t":"<div dir=\"ltr\"><table width="200" border="1">
  <tr>
  <td width="2" height="1" align="center" bgcolor="#00FF00">12</td>
  <td align="center">&nbsp;</td>
  <td>&nbsp;</td>
  <td align="center">&nbsp;</td>
  <td>&nbsp;</td>
  <td valign="middle">&nbsp;</td>
  </tr>
  <tr>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  </tr>
  <tr>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  </tr>
  <tr>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  </tr>
  <tr>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  </tr>
</table>"
  }]


小弟菜鸟一只~请问高手们如何才能实现,还有为啥我那d栏color:red也不管用呢。。求大神解救

------解决方案--------------------
"d":"<div dir=\"ltr\" style=\"color:red;\">123<br><br>123<br>123br><br>", 

------解决方案--------------------
color:red ===》style="color:red;"