实际上我不确定我正在尝试做的事情的术语。我有一个动态页面 (php),我希望人们能够将其“插入”到他们的博客中。插入几行代码,将 php 页面插入到他们的博客中,就像 Google 有几行代码可以将 Adsense 添加到页面中一样。
这就是我所拥有的,我认为是正确的,但是我如何获得 html,我只使用帖子吗?一定有更简单的方法吗?
<div id='fill'></div>
<script type='text/javascript'>
??? Code to get html ????
$("div#fill").html(html);
</script>
编辑:试图重新解释
最佳答案
您可以只使用一个简单的 html iframe:
<iframe src="http://www.google.com" width="50%" height="300"></iframe>
有关 iframe 的更多信息: https://developer.mozilla.org/en/HTML/Element/iframe
关于javascript - 如何创建博客插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5197492/