Javascript implementation method _ javascript tips for small discovery in the Flash activation box does not appear in IE
Source: Internet
Author: User
We all know that the method of deceiving IE from Flash activation box is simple as long as a js file is introduced on the page, then, use js to control the html code output of flash. However, if our script is dynamically loaded, there will be two situations. See the following code:
Program code
Var s = docuemnt. createElement ("script ");
S. src = src;
Docuemnt. getElementsByTagName ("head") [0]. appendChild (s );
Program code
Var s = docuemnt. createElement ("script ");
Docuemnt. getElementsByTagName ("head") [0]. appendChild (s );
S. src = src;
At a glance, the execution results of these two broken codes are similar. However, there is a piece of code that cannot fool IE, and the imported js output flash will show an activation box.
The only difference between the two disconnections is to assign a value to the src of the script object and append it to the head. Or append first and then assign a value. I did an experiment. I only need to assign a value to the src of the script and append it to the page to cheat IE.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service