js赋值后,不影响源变量的方法。

以前都没发现这个问题,特记录一下。

var productListData={pages:001};

var data=productListData;//这样就会有问题。

data=$.extend(true,{},productListData);