javascript - Extract and execute scripts from AJAX response -


my ajax response returns this:

<div> .. </div>  <script type="text/javascript"> .. </script>  <script type="text/javascript"> .. </script>  <div> .. </div> 

i want execute scripts script tag (should work cross-browserly) , insert text (divs) page after.

your script tags don't need type="text/javascript" attribute cross-browser compatibility.

and javascript execute top down. whatever script comes first execute first. add text insertion last, this:

html:

<div id="mydiv"></div> 

javascript:

document.getelementbyid("mydiv").innerhtml = "hello"; 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -