var dataObj = eval('(' +data+ ')') data是返回来的json。 dataObj就是json对象了。 为什么要添加 '(' 与 ')' 作为开始于结尾呢? json是以"{}"开始以及结束的,在js中,它会被当做语句块来处理