如何嵌入我的Web应用程序
问题描述:
我是Javascript,HTML5和CSS Web应用程序开发人员,但我不知道如何使我的Web应用程序可嵌入,因此人们也可以将其嵌入到自己的网站中.请,除了PHP以外的任何方法都将受到赞赏.
I am a Javascript, HTML5 and CSS web application developer, but I don't know how to make my web apps embeddable, so people can embed them in their sites too. Please, any method except PHP will be much appreciated.
答
提供一个人们将在其网页中包含的javascript文件+一些带有
Provide a javascript file that people will include in their web pages + some div with marker like
<div id="divtofillwithyourcontent"></div>
脚本应使用您的内容填充此元素.
And script should fill this element with your content.
或者如果需要访问cookie,请使用iFrame(我建议您在所有其他情况下都不要使用它)
Or use iFrame if you need access to your cookies (i suggest you not use it in all other cases)