- How do you put a message in the browser’s status bar?: windows.status(“hello world”);
- How does a “while” loop start?: while(i<=10);
- What is the purpose of DOM (Document Object Model)?: The DOM represents the structure of a web page. You use it to add dynamic functionality to the page.
- DOM core methods to create new objects for a document:
- How do you round a number to the nearest integer?: Math.round(7.25);
- How do you find the Maximum number between two numbers?: Math.max(x,y);
- Internet Explorer 6,7 and 8 do not support addEventListener() and removeEventListener(). Use similar attachEvent() and detachEvent() functions instead.
Some events in the HTML DOM ‘bubble’ meaning that if the event occurs on an element (and it is or isn’t handled), the event will then also fire on the element’s parent node and then on its grandparent node and so on until the event reaches an element where it may not bubble any further or it reaches the root node. Both addEventListener and removeEventListener have an optional third Boolean parameter indicating whether or not this is the case.
- How do you find clients browser name?: navigator.appName
document.write(“hello my name is \
- Having the following code what does this code returns….(this is a nice exercise):