<html>
<body><p id="number">1</p>
<button οnclick="add()">点击+1……</button>
</body>
<script>
function add()
{
var x=document.getElementById("number").innerHTML;
x=parseInt(x)+1;
document.getElementById("number").innerHTML=x;
}
</script>
</html>
<html>
<body></script>
</html>