-1 内配字符串我有这个字符串更换双引号 var newtypegraph=newtypegraph.replace(' "type":"bar3d" ',' "type":"area" '); 我要让bar3d作为通配符。 来源 2013-04-15 SyamAhmad +0 这是一个JSON字符串吗? – Blender +0 你的问题非常含糊......你认为*作为通配符的含义是什么? – Jesse
1 这看起来像JavaScript,因此你可以使用正则表达式: var newtypegraph = newtypegraph.replace(/"type":".*?"/g, '"type":"area"'); 这看起来像一个JSON对象的属性。这是JSON吗? 来源 2013-04-15 03:20:31 Blender +0 是的,他们是。混淆使用正则表达式。感谢您的快速帮助。解决了。 – SyamAhmad +0 @SyamAhmad:你能解析JSON并用JavaScript代替属性吗? – Blender
这是一个JSON字符串吗? – Blender
你的问题非常含糊......你认为*作为通配符的含义是什么? – Jesse