add cross domain use example
npm i
And remember to run node compile.js after update.
node compile.js
Vanilla JS:
<script> var xhr = new XMLHttpRequest(); xhr.open('GET', '/efe-meta/html/full-intro.html', true); xhr.send(); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { document.getElementById('links').insertAdjacentHTML('beforeend', xhr.responseText); } }; </script>
jQuery:
<script> $.get('/efe-meta/html/full-intro.html').then(function (html) { $('#links').append(html); }); </script>
Cross Domain:
<script charset="UTF-8" src="https://ecomfe.github.io/efe-meta/js/full-intro.js"> $.get('/efe-meta/html/full-intro.html').then(function (html) { $('#links').append(html); }); </script>
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Update
And remember to run
node compile.jsafter update.Quick Snippets
Vanilla JS:
jQuery:
Cross Domain: