This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17326|Reply: 5

[JavaScript] HTML development displays layout boundaries

[Copy link]
Posted on 10/25/2014 10:50:53 PM | | | |
This post was last edited by microxdd on 2014-10-25 23:00

The JS code required for HTML development needs to be placed before the code is placed at the bottom of the page</body>
The effect display browser requires IE9 or above

Note
In the code[].forEach.call($$ There are 2 dollar signs here, and the discuz editor has a bug and only shows one.

  1. <script type="text/javascript">
  2. [].forEach.call($('*'),function(e){e.style.outline='1px solid #'+(~~(Math.random()*(1<<24))).toString(16)});
  3. </script>
Copy code










Previous:What is the meaning of spider homing? What is spider homing?
Next:Baidu Cloud accelerates the use of free CDN acceleration service in China - Baidu Spider DNS synchronization function
Posted on 10/25/2014 10:52:50 PM |
Isn't the js code necessary to be <head>in it?
 Landlord| Posted on 10/25/2014 10:56:51 PM |
admin posted on 2014-10-25 22:52
Isn't the js code necessary to be in it?

No, it can be anywhere. Some js must be placed at the front, but others must be placed at the end of the document. It depends
Posted on 10/25/2014 10:59:25 PM |
microxdd posted on 2014-10-25 22:56
No, it can be anywhere. Some js must be placed at the front, but others must be placed at the end of the document. It depends

Oh, and we haven't learned JS yet, when will Phuket learn?
 Landlord| Posted on 10/25/2014 11:01:47 PM |
admin posted on 2014-10-25 22:59
Oh, and we haven't learned JS yet, when will Phuket learn?

This code can be used directly in the browser F12 console
Posted on 10/25/2014 11:02:35 PM |
microxdd posted on 2014-10-25 23:01
This code can be used directly in the browser F12 console

Then I'll try it with Google Chrome
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com