jjzjj

currentSelect

全部标签

javascript - JSON.解析 : unexpected non-whitespace character after JSON data

我希望创建一个从4个选择菜单的选定选项派生的JSON对象。这些菜单可能在加载时选择了选项(由于服务器端技术)或者可能没有选择任何选项!使用$(document).ready()加载页面后,我的脚本就会运行……但是我遇到了JSON对象的一些问题“JSON.parse:JSON数据后出现意外的非空白字符”我希望我的JSON具有以下结构selObj={category:selectedCategory,//wecanonlyhave1category,thisisn’tgivingmeaproblem…catOptions:{optionValue:discountValue,//wecan