It works in Google Chrome, Internet Explorer, Mozilla Firefox, Safari and Opera browsers. It is useful in working on manipulating or getting info from the element on to your document. JavaScript’s method works with the help of the HTML DOM. This getElementById() method works by returning the element which is having an ID attribute with the specific/specified value. The getElementById() method of the JavaScript works based on the parameter which is passed inside of it. This parameter accepts only string types. The ID’s attributes value of the element which you want to get. Explanation of the Parameters of getElementById():ĮlementID1: This elementID1 parameter of the document.getElementById() function is a mandatory field and required.
0 Comments
Leave a Reply. |