标签:
JsonConvert.SerializeObject(model)
XmlDocument doc = new XmlDocument();
doc.LoadXml(cam.Cam_Config);
var camConfig = Newtonsoft.Json.JsonConvert.SerializeXmlNode(doc);
js 调用:
window.camConfig = [<%=(camConfig) %>];
if (camConfig.length>0) {
for(var property in camConfig[0].xml.cam) {
$(‘#‘+property).val(eval(‘camConfig[0].xml.cam.‘+property));
}
}
标签:
原文地址:http://www.cnblogs.com/change4now/p/5665221.html