<head>
<meta http-equiv=content-type content="text/htmlcharset=GBK">
</head>
<body>
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td id="a">sdfsd</td>
</tr>
<tr>
<td id="b">sdfsdf</td>
</tr>
<tr>
<td id="c">sdfsd</td>
</tr>
<tr>
<td id="d">sdfsdf</td>
</tr>
</table>
</body>
<script>
var jsonStr = "{\"a\":\"内容1\", \"b\":\"内容2\",\"c\":\"内容3\",\"d\":\"内容4\"}"
var jsonObj = eval("(" + jsonStr + ")")
for(var property in jsonObj){
var nodeObj = document.getElementById(property)
if(nodeObj)
nodeObj.childNodes[0].nodeValue = jsonObj[property]
}
</script>
</html>
C#如何将php序列化后的字符串转成json字符串 只需要html转码就行了 System.Web.HttpUtility.HtmlEncode(HtmlDecode)方法对字符进行编码(解码)的答题不易,互相理解,您的采纳是我前进的动力,感谢您。希望回答对你有帮助,如果有疑问,请继续追问欢迎分享,转载请注明来源:内存溢出
评论列表(0条)