Home > Web Front-end > JS Tutorial > body text

How to use innerhtml to improve page opening speed_javascript skills

WBOY
Release: 2016-05-16 17:27:21
Original
1529 people have browsed it

Looking at the source code, you can find that there is only one line of login code at the top of the page

Copy code The code is as follows:

< /div>

And the position of the flash slideshow is only one line
Copy code The code is as follows:



For this kind of time-consuming code, it is best to place it at the end of the page Load, and then use the innerhtml method to load to the corresponding location to speed up page opening.
Copy code The code is as follows:

$("#headtop").html($( "#headtop2").html());
$("#index_slide").html($("#index_slide2").html());
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!