简体   繁体   中英

How can I embed my web application

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.

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.

Or use iFrame if you need access to your cookies (i suggest you not use it in all other cases)

They could use an iFrame, or they can make an AJAX GET call, for example with jQuery. The response of the AJAX call will be your HTML5/JS which can then be put into a container(div) for the caller.

$.get('ajax/test.html', function(data) {
  $('.result').html(data);
     alert('App Loadded');
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM