【发布时间】:2011-02-22 01:00:14
【问题描述】:
我需要在 body 标记之后添加一些 html,例如:
<body>
<p>this is the HTML I need to add</p>
</body>
这是我的 jQuery 代码:
jQuery(document).ready(addPageFlipHTML);
function addPageFlipHTML() {
jQuery('body') // after body tag
.after(
"<div id='pageflip'><a href='http://sabwd.com'><img src='/test/wp-content/plugins/page-flip/images/page_flip.png' alt='' />" //create this html
+ "<span class='msg_block'>Subscribe via RSS</span></a></div>");
}
有人知道怎么做吗?我正在尝试编写一个通用插件,需要一个明确的标签,如 body 后添加。
提前致谢,
迈克
【问题讨论】: