Question
Can you work out how to further modify the code of Listing 14.2 and Listing 14.3 to ensure that users without JavaScript enabled see just
Can you work out how to further modify the code of Listing 14.2 and Listing 14.3 to ensure that users without JavaScript enabled see just the content of the
14.2 Exercise
The current date and time are:< br/>
Your browser does not support JavaScript.
Please consult your computer's operating system for local date and time information or click HERE to read the server time.
14.3 datetime.js is the JS script
function telltime()
{
var out = "";
var now = new Date();
out += "
Date: " + now.getDate();
out += "< br /> Month: " + now.getMonth();
out += "< br /> Year: " + now.getFullYear();
out += "< br /> Hours: " + now.getHours();
out += "< br /> Minutes: " + now.getMinutes();
out += "< br /> Seconds: " + now.getSeconds();
document.getElementById(" div1").innerHTML = out;
}
window.onload = function()
{
document.getElementById("btn1").onclick = function() {location.reload();}
telltime();
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started