Tag Archive | Document Object Model

JavaScript: Understanding Document Object Model (DOM)

Document Object Model or DOM is a programming interface for the document (HTML, Dynamic HTML or XML) which provide the ability to manipulate the elements (HTML tags and String literal) that makes up a document. In a normal scenario, when server sends the response in the form of an HTML page, browser takes that HTML […]

Javascript: Printing out content using alert box

Using “alert” is great for debugging purpose. To check, if the value assigned is proper or not, you simply need to put out the content inside the javascript function. Output

Javascript: Use of innerHTML attribute

Javascript has the ability to change the DOM (Document Object Model). innerHTML defines what content is present between the starting HTML tag and Ending HTML tag. Using this attribute we can change the content depending on some user action and make the page more interactive. Let’s see a short example Output