将包含<pre>标签的json转换成js

it2025-03-29  18

data ="<pre style="word-wrap: break-word; white-space: pre-wrap;">{"result":1,"Msg":"上传成功!"}</pre>"  

var obj = jQuery.parseJSON(jQuery(data).text());

obj={"result":1,"Msg":"上传成功!"}

转载于:https://www.cnblogs.com/lhlong/p/6233156.html

最新回复(0)