如何使用Javascript或JQuery编码和解码HTML实体?
我使用ajax调用,并以json格式获取此数据。这是我在var Title中设置的。
var Title = "<p>? <span style="color: rgb(0, 0, 0); font-family: Helvetica, Verdana, Geneva, Arial, sans-serif; font-size: 15px;">Bananas have thick inedible skins that turn yellow or red when ripe. As the most popular fruit in the world, they grow on trees in the subtropics and tropics. You can eat some varieties after skinning them, but some are inedible raw</span></p>?"我希望它是:
varTitle = "Bananas have thick inedible skins that turn yellow or red when ripe. As the most popular fruit in the world, they grow on trees in the subtropics and tropics. You can eat some varieties after skinning them, but some are inedible raw.";发布于 2013-02-02 18:28:54
使用UrlDecode()此函数。也许它会对你有所帮助。
https://stackoverflow.com/questions/14660794
复制相似问题