JavaScript timer for a quiz

Viewed 18016

I am making a quiz game for a project in HTML and JavaScript. On every question, the player has 15 seconds to answer. I managed to do it like this:

<body onload="setTimeout(Timer,15000)">

and then in Js:

function Timer()
    {
         alert("You are out of time!");
    }

However, I want to be able to display how much time the player has left in a <p> tag. How could I do that?

3 Answers
Related