I'm trying to have a button change the text within a P tag. Doing this once is fine:

function lights()
document.getElementById("lights").innerHTML="Lights on";
BUT, what I'd like to do is have it toggle between two pieces of text each time the button is clicked. For example, the button should change the text to "lights on" or lights off".

Thanks in advance for your help and apologies for asking such a basic question, but we've all got to start somewhere