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
Post a Comment