<input id="total" />
<p></p>
I have html code that has a blank <p>
, but once you add something into an input, the javascript is adding it to the <p>
tag. I am wondering how to alert if the new value of <p>
is over 5000.
I have:
if(document.getElementById("total").value > 5000){
alert("to high");
}
but that seems to not affect the new value of the paragraph, how to I make is so the alert will show if the new value of the paragraph is over 5000?