gpt4 book ai didi

javascript - 如何用 JavaScript 编写 HTML?

转载 作者:行者123 更新时间:2023-11-28 13:54:16 26 4
gpt4 key购买 nike

我对 JS 很讨厌,更像是一个 Python 人:)

我有一个简单的问题:

“document.write”仅接受文本,但我想显示 iframe

else
{
document.write('<p class="no">We\'ve detected that you\'re using <strong>AdBlock Plus</strong> or some other adblocking software. Please be aware that this is only contributing to the demise of the site. We need money to operate the site, and almost all of that comes from our online advertising. To read more about why you should disable ABP, please <a href="#">click here</a>.<!-- end .content --></p>');
}

所以

else
{
document.write('<iframe src="http://www.om-p.com"></iframe>');
}

最佳答案

尝试

document.body.innerHTML = "[Your code here]";

关于javascript - 如何用 JavaScript 编写 HTML?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8973234/

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