The most viewed posts

Registry Reviver

Web Development Services

How to clean up Windows Computer

About Desktop Icons in Windows Computer

Driver Booster

How to make a computer secure and run faster

CCleaner

Myanmar font and keyboard for Windows

Contact Me

Advanced System Care

The most viewed items

Dell Inspiron 5559

Desktop Hard Disk

HP ProBook 430

Laptop RAM

SONY Playstation Portable

External Hard Disk

Laptop

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 show.

    To Contact
    Available Services
    Terms and Conditions