The most viewed items
<!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>
<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>
No comment to show.