Un ejemplo sencillo:
Here’s a simple script you can try first. It shows every link on the page as a NodeList in the console, which is useful for quick checks.document.querySelectorAll("a");Or you could highlight all links on the page:document.querySelectorAll("a").forEach(a => a.style.outline = "2px solid red");Some people turn snippets like these into bookmarklets (small saved JavaScript actions). That can be useful, but for teaching and quick testing, the console is often easier. I explain why at the end of the article.
No hay comentarios:
Publicar un comentario