Javascript examples for DOM HTML Element:Paragraph
Update text inside <P> via innerHTML
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <p id="decrease">$399.99</p> <button type="button" onclick="decrease();">Start Now!</button> <script type="text/javascript"> var i=399.99; function decrease()/*from www .j av a 2 s . c om*/ { i-=0.25; document.getElementById('decrease').innerHTML= '$' + +i; } </script> </body> </html>