1.1 Dynamic Web pages
A good webpage can never be static. Based on the user inputs, the page should respond accordingly.
Method: It is a piece of code that is invoked and executed at the time of the call. More about methods by mmtuts
In HTML every tag can be assigned with an id. This id is a unique way of targeting the respective HTML tag it is associated with.
Read more about id and classes at w3School.com
document.getElementById('id of html tag').'attribute'='attributeName';
The ‘onclick’ method is used to invoke different methods of clicking the button it is associated with. Once the button is clicked, getElementById function is invoked with the id of the paragraph i.e. ‘one’ and an attribute i.e. innerHTML. Further, the = is used to assign the value to the innerHTML of the tag.