It does increase the variable, however it writes to the innerHTML then increments the value, You could use ++a
which will increase the value before it writes to the innerHTML.
var a = 14
var b = 14
console.log('before a', a)
document.getElementById("test1").innerHTML = a++
console.log('after a', a)
console.log('before b', b)
document.getElementById("test2").innerHTML = ++b
console.log('after b', b)