html - Load/include javascript file in Ajax success -


i want know if it's possible load javascript file in ajax response in html page, code:

<script src="../assets/plugins/myscript.js" type="text/javascript"></script> <script type="text/javascript">     myfunc();      function myfunc(){          $.ajax({                 type: "post",                 url: "load_page.php",                 data: { type:'testa' },                 cache: false,                 success: function(html){                     $("#test_id").html(html);                     //here want reload script have import above myscript.js                 }             });          return false;     } </script> 


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -