eval json报错 如何解决

renzaijiang 2010-02-09 06:02:04
<script>
var addon_list=eval('([{"id":"2","videocode":"<object width=\"420\" height=\"363\"><param name=\"movie\" value=\"http:\/\/www.tudou.com\/l\/rl4y16-vMSc\"><\/param><param name=\"allowFullScreen\" value=\"true\"><\/param><param name=\"allowscriptaccess\" value=\"always\"><\/param><param name=\"wmode\" value=\"opaque\"><\/param><embed src=\"http:\/\/www.tudou.com\/l\/rl4y16-vMSc\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" wmode=\"opaque\" width=\"420\" height=\"363\"><\/embed><\/object>","sortrank":"0","archives_id":"8","recycle":"0"},{"id":"3","videocode":"<object width=\"420\" height=\"363\"><param name=\"movie\" value=\"http:\/\/www.tudou.com\/l\/rl4y16-vMSc\"><\/param><param name=\"allowFullScreen\" value=\"true\"><\/param><param name=\"allowscriptaccess\" value=\"always\"><\/param><param name=\"wmode\" value=\"opaque\"><\/param><embed src=\"http:\/\/www.tudou.com\/l\/rl4y16-vMSc\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" wmode=\"opaque\" width=\"420\" height=\"363\"><\/embed><\/object>","sortrank":"0","archives_id":"8","recycle":"0"}])');
</script>
...全文
355 5 打赏 收藏 举报
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
sohighthesky 2010-02-09
  • 打赏
  • 举报
回复

" <object width=\"420\" height=\"363\"> "
这个字符串写法是错的,双引号里面要使用单引号,你这样两个连续的双引号肯定是不行的
hao_ljp 2010-02-09
  • 打赏
  • 举报
回复
json字符串有问题撒 只有个人找了 太长了。。。
renzaijiang 2010-02-09
  • 打赏
  • 举报
回复
缺少 '}'
上面粘贴到浏览器就得到了
Alien 2010-02-09
  • 打赏
  • 举报
回复
把您的错误信息传上来吧
changshoujun 2010-02-09
  • 打赏
  • 举报
回复

<object width=\"420\" height=\"363\">
<param name=\"movie\" value=\"http:\/\/www.tudou.com\/l\/rl4y16-vMSc\"> <\/param>
<param name=\"allowFullScreen\" value=\"true\"> <\/param>
<param name=\"allowscriptaccess\" value=\"always\"> <\/param>
<param name=\"wmode\" value=\"opaque\"> <\/param>
<embed src=\"http:\/\/www.tudou.com\/l\/rl4y16-vMSc\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" wmode=\"opaque\" width=\"420\" height=\"363\">
<\/embed>
<\/object>
<object width=\"420\" height=\"363\">
<param name=\"movie\" value=\"http:\/\/www.tudou.com\/l\/rl4y16-vMSc\"> <\/param>
<param name=\"allowFullScreen\" value=\"true\"> <\/param>
<param name=\"allowscriptaccess\" value=\"always\"> <\/param>
<param name=\"wmode\" value=\"opaque\"> <\/param>
<embed src=\"http:\/\/www.tudou.com\/l\/rl4y16-vMSc\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" wmode=\"opaque\" width=\"420\" height=\"363\">
<\/embed>
<\/object>
报什么错啊?
发帖
JavaScript

8.7w+

社区成员

Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
帖子事件
创建了帖子
2010-02-09 06:02
社区公告
暂无公告