单机按钮票数加一,用total.innerHTML = parseInt(total.innerHTML) + 1可以,但要是用var num = total.innerHTML 把total.innerHTML 都替换掉就不行,为什么
<script>
function vote(e){
var total = document.getElementById("total");
var num = total.innerHTML;
num = parseInt(num)+1; //这样就没效果
}
</script>