开发者

Allowing embedding of HTML to other pages. Iframe-, Script-tag?

I need to allow other people to embed some of my HTML and Javascript code. The HTML code itself is too much to be copy&pasted.

Should I use Iframes or script-tags for embeding it?

The script tags and iframes are used for example by Stackoverflow on Flair p开发者_如何学Goage How does those even exactly work? Aren't those a security risk?

What method would you prefer?


Make a file such as content.html and paste the html source there. Then you can include this file in the place you want to appear. For example, using php you can use

include 'path/to/content.html'; 

at the place you want to embed the html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜