<input id="btnPlus" type="button" value="+" onclick="numberPlus()">
<input id="btnMinus=" type="button" value="-" onclick="numberMinus()">
<p id="number">0</p>
var x = 0
function numberPlus() {
	document.getElementById("number").innerHTML= ++x;  
}
function numberMinus() {
	document.getElementById("number").innerHTML= --x;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.