Search results for 'javascript include in javascript'. 1 post(s) found.

  1. 2008/01/25 How to include Javascript from anonther ?
2008/01/25 15:30

How to include Javascript from anonther ?


Actually there is such a function in PHP which function is "include".
It's very strong function.

But Javascript does not support such a function.

Here's the alternate method to do that.


To include javascript, following is using usually:

<script type="text/javascript" src="the_script.js"></script>


But above script is not available in Javascript so following is the alternate method to include another javascript.

the_another_javascript.js:

document.write( "<script type=\"text/javascript\" src=\"the_script.js\"></script>");

Isn't it simple ?

Actually the main logic above is writing script tag in the document.

Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 03:53 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 12:45 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:43 delete

    moneyideas