首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Opencart中使用Javascript或JQuery对HTML实体进行编码和解码

在Opencart中使用Javascript或JQuery对HTML实体进行编码和解码
EN

Stack Overflow用户
提问于 2013-02-02 18:09:10
回答 1查看 3.7K关注 0票数 1

如何使用Javascript或JQuery编码和解码HTML实体?

我使用ajax调用,并以json格式获取此数据。这是我在var Title中设置的。

代码语言:javascript
复制
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>?"

我希望它是:

代码语言:javascript
复制
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.";
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-02-02 18:28:54

使用UrlDecode()此函数。也许它会对你有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14660794

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档