The most viewed posts

Registry Reviver

Contact Me

Web Development Services

Computer Repair and Maintenance Service

How to clean up Windows Computer

Driver Booster

About Desktop Icons in Windows Computer

CCleaner

How to make a computer secure and run faster

Myanmar font and keyboard for Windows

The most viewed items

Dell Inspiron 5559

Desktop Hard Disk

Laptop RAM

SONY Playstation Portable

HP ProBook 430

External Hard Disk

Laptop

Please login to start chat

ZilaStar ICT Jul 30 2022, 11:40:30
Category : JavaScript Tutorials

JS Event Listener 1

<!DOCTYPE html>
<html>
<head>
<title>JavaScript Code Testing</title>
</head>
<body>
<p id = "demo">The Date is:</p>
<button type = "button" id = "test">Show Date</button>&nbsp;&nbsp;
<button type = "button" id = "test1">Hide</button>
<script>
document.getElementById("test").addEventListener('click', jsFun);
document.getElementById("test1").addEventListener('click', jsHide);

function jsFun(){
document.getElementById("demo").innerHTML = Date();
}

function jsHide(){
document.getElementById("demo").innerHTML = "";
}

</script>
</body>
</html>

  • Comments:

    No comment.

    To Contact
    Available Services
    Terms and Conditions