gpt4 book ai didi

jquery - 如何 append xmlns :fb ="http://www.facebook.com/2008/fbml" to my CMS's html tag

转载 作者:行者123 更新时间:2023-11-30 05:22:03 25 4
gpt4 key购买 nike

我想知道如何将这些属性添加到由我们封闭的 CMS 系统自动生成的 html 标记中。

我想添加到我们当前的 html 标签中:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

对此:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">

有什么方法可以使用 JQuery 做到这一点吗?

最佳答案

$(function () {
$("html").attr("xmlns:og","http://ogp.me/ns#");
}

HTML 标记中的 XML 命名空间属性很少与页面行为相关。

关于jquery - 如何 append xmlns :fb ="http://www.facebook.com/2008/fbml" to my CMS's html tag,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4892686/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com