javascript - I recently saw a website. The navigation bar was written using the js file document.writeln, and then the body was introduced into the index and the file was introduced at the beginning.
滿天的星座
滿天的星座 2017-05-19 10:31:28
0
3
611

I recently saw a website. The navigation bar is written using the js file document.writeln, and then the body is introduced into the index and the file is introduced at the beginning. I would like to ask everyone, is there any difference between this method and writing tags directly in html?

滿天的星座
滿天的星座

reply all(3)
左手右手慢动作

No difference. This is to facilitate the dynamic generation of p structures.

伊谢尔伦

No difference, right?

黄舟

There is no difference, but I suspect that if it is written like this, if the file is too long, it may not be fully displayed?

Because document.wirteln will treat the current file, and the current js code is also in this file,
The code is gone, and the execution is still messed up. . . . .
I encountered this situation when using document.wirie during testing before.

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!