This article describes the method of JavaScript returning the number of anchor points in a web page. Share it for your reference. The details are as follows:
JavaScript returns the number of anchors in the web page, and the following JS code gets the number of anchors in the page
<!DOCTYPE html> <html> <body> <a name="html">HTML Tutorial</a><br> <a name="css">CSS Tutorial</a><br> <a name="xml">XML Tutorial</a><br> <a href="https:///">JavaScript Code</a><p>Number of anchors: <script> (); </script></p> </body> </html>
I hope this article will be helpful to everyone's JavaScript programming.