开发者

Trouble moving Inline Javascript to the very end of my html file

Is it开发者_如何学C possible to move a remote inline javascript widget to the very end of my html, and then, once the DOM is ready, inject the widget inside a specific element. I see inline javascript as a candidate for poor performance.

Thanks in advance.


It will depend entirely on how the widget in question is designed to be used. Looking briefly at the link you gave to TweetMeme, no, it doesn't immediately look like you can do that. But check the docs, they may well have a means of allowing you to do it. If they don't say they do, though, they're probably relying on writing to the document as it's being prepared, in which case you're out of luck.

Edit: They're using document.write, it won't work after-the-fact; see the source.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜