@using Newtonsoft.Json; var vData=@Html.Raw(JsonConvert.SerializeObject(ViewData)); var Code=vData["Code"]; alert(Code);
详情链接:https://blog.csdn.net/honeycandys/article/details/54945372?depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1&utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1