weixin_33738578 2013-11-23 14:55 采纳率: 0%
浏览 341


I have a json object that is being used here

var tagApi = jQuery(".tm-input").tagsManager({
      prefilled: ["Angola", "Laos", "Nepal"]

      name: 'SEARCHVAR',
      limit: 3,
      prefetch: '../_realRETS/php/search/all.jsonp'
    }).on('typeahead:selected', function (e, d) {

      tagApi.tagsManager("pushTag", d.value);


The file Contents of the Json File look as such...


However I get an error because of the single quotation... and have tried the following methods, please note if my methods "Should work" I would like to know about it regardless.

I've tried escaping the quote by using ["test\'s"] and also by using html encoding, however the encoding works, it shows up in the tag with the acctual encode text rather then the character.

Please help understand how I could use single quotes in this plugin.

  • 写回答

0条回答 默认 最新


      相关推荐 更多相似问题


      • ¥15 MySQL行转动态列的问题
      • ¥15 通过STM32F4实现智能清洁小车,要求用到三个以上传感器
      • ¥15 perl代码解释说明
      • ¥15 列举 五阶幻方 有多少种
      • ¥15 请教一下能人在VS中调用MATLAB绘制动态驻波
      • ¥15 VB.NET如何调用Microsoft Excel?(WPS存在时)
      • ¥15 KUKA机器人EtherNetIP通讯配置教程
      • ¥15 VB6.0如何模拟键盘组合按键
      • ¥15 python怎么替换这个word里边内容
      • ¥15 做谷歌浏览器插件的时候,怎么在background.js中优先执行其他.js文件里面函数呀?