In this article we will learn about some of the frequently asked TypeScript programming questions in technical like “queryselectorall of multiple tags” Code Answer. When creating scripts and web applications, error handling is an important part. If your code lacks error checking code, your program may look very unprofessional and you may be open to security risks. Error or stack handling on typescript was simple and easy. An error message with filename, line number and a message describing the error is sent to the browser. This tutorial contains some of the most common error checking methods in Typescript. Below are some solution about “queryselectorall of multiple tags” Code Answer.
queryselectorall of multiple tags
Yes, because querySelectorAll accepts full CSS selectors,
and CSS has the concept of selector groups, which lets you specify
more than one unrelated selector. For instance:
var list = document.querySelectorAll("form, p, legend");
will return a list containing any element that is a form or p or legend.
CSS also has the other concept: Restricting based on more criteria.
You just combine multiple aspects of a selector. For instance:
var list = document.querySelectorAll("div.foo");
will return a list of all div elements that also (and)
have the class foo, ignoring other div elements.
You can, of course, combine them:
var list = document.querySelectorAll("div.foo, p.bar, div legend");
which means "Include any div element that also has the foo class,
any p element that also has the bar class, and any legend element
thats also inside a div."