For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Sunday, February 28, 2016

how to include js file in JavaScript code

How to include js file in JavaScript code

Sometime you need to include js file in javaScript code. below is the code that will solve this problem.

<script type="text/javascript">//<![CDATA[
document.write('<script src="url_path/js/js-file.js"><\/script>');
}
//]]>
</script>
Share:

0 comments:

Post a Comment

Add Dependent Scripts

   here is the code that allow to add dependent script :         <script>         const addDependentScripts = async function( scriptsT...

Ads Inside Post

Powered by Blogger.

Arsip