dongque3797 2012-01-27 22:22
浏览 390

iPhone手机safari JSON解析错误

I am using php json_encode to encode arrays of objects and storing them in a hidden div. Then using jquery.parseJSON to put them into js arrays of objects to work with. I am using jQuery v1.7. The exact error is JavaScript Error on Line 2: SyntaxError: Unable to parse JSON string. This error only occurs on the mobile version of safari. FF, Chrome, IE Safari and android all work, it only pulls this error with mobile safari. Any thoughts?

  • 写回答

1条回答 默认 最新

  • dongyuan1870 2012-01-30 17:05
    关注

    After eliminating different fields, I discovered the problem was only in phone numbers. The automatic detection of phone numbers either interfered with json or json interfered with the detection of phone numbers. Adding <meta name="format-detection" content="telephone=no"> solved the error.

    评论

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?