Week 13 - 14 Advanced JavaScript (DOM & JSON) - 1
Week 13 - 14 Advanced JavaScript (DOM & JSON) - 1
Week 13 - 14 Advanced JavaScript (DOM & JSON) - 1
Model (DOM)
Manipulation
With the object model, JavaScript gets all the power it needs to
create dynamic HTML:
<p id="demo"></p>
style="background-color:#D94A38;width:120px;height:20p </script>
x;padding:40px;">
</body>
Mouse Over Me</div>
</html>
The onmousedown,
onmouseup and
onclick Events
The onmousedown, onmouseup
and onclick Events
The onmousedown, onmouseup, and onclick events are all
parts of a mouse-click. First when a mouse-button is
clicked, the onmousedown event is triggered, then, when
the mouse-button is released, the onmouseup event is
triggered, finally, when the mouse-click is completed, the
onclick event is triggered.
The onmouseover and onmouseout events can be used to trigger a
function when the user mouses over, or out of, an HTML element:
function mUp(obj) {
document.getElementById("myBtn").addEventListener("click", displayDate);