Home  >  Article  >  Web Front-end  >  Asynchronously loading script code_javascript skills

Asynchronously loading script code_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:12:001120browse

Asynchronously loading scripts through iframe
Asynchronously requesting scripts from another page will not be executed, and only the original HTML file will be returned, because the returned text has not been parsed and executed by the browser.
Look at the code
a1.html

Copy the code The code is as follows:

< ;html xmlns="http://www.w3.org/1999/xhtml">

Untitled page







a2.html
Copy code The code is as follows:

< ;html xmlns="http://www.w3.org/1999/xhtml">

Untitled page

<script> <br>alert('I am an asynchronous script'); <br></script>


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn