ExampleSelect the element with the id "choose":
Try it yourself » |
The # selector selects an element with a unique id.
The id refers to the id attribute of a HTML element.
The same id should never be used more than once in a document.
$("#id") |
Parameter | Description |
---|---|
id | Required. Specifies the id of the element to select. The id selector uses the id attribute of the HTML element |
Note: Do not start an ID name with a number. It may cause problems in some browsers.