url上获取json对象问题
HTMLPage4.htm?_pageinfo={"_mailid":"INBOX","_num":1,"_pagesize":10,"_sortname":"mail_time","sortvalue":"desc"}
获取了 url的参数后 为什么无法把这个json串转化为对象呢》?
获取_pageinfo值 后 eval也无法转化为对象
问 如何把这个url值转化为json对象
------解决方案--------------------
JScript code
s = '{"_mailid":"INBOX","_num":1,"_pagesize":10,"_sortname":"mail_time","sortvalue":"desc"}'
s = eval('('+s+')')
alert(s._mailid)