Query selector

The querySelector method of the document object provides us with a means to access a DOM element using a CSS query selector, in a manner similar to the jQuery library. We can access the h2 element containing the welcome message, on the IGWEB homepage, using the querySelector method of the document object.

JavaScript

element = document.querySelector(".welcomeHeading");

GopherJS

element := js.Global.Get("document").Call("querySelector", ".welcomeHeading")

DOMBinding

element := dom.GetWindow().Document().QuerySelector(".welcomeHeading")
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.56.29