后台代码:
List<WMSRptJHJY> wpjh = WMSRptJHJYManage.GetModelList(""); ViewBag.WPJH = Newtonsoft.Json.JsonConvert.SerializeObject(wpjh);
前台代码:
var aa = '@Html.Raw(ViewBag.WPJH)'; var PWJH = eval("(" + aa + ")");