I'm attempting to increase the font size with the click of a button. I have got the first one to work but I can't get my head around the second one. The second one, every click will increase the font by 1px (I'm pretty much stuck):
<input type=button value=Increase Font Size 100px onclick=increaseFontSizeBy100px()>
<p id=a>Font Size</p>
<input type=button value=Increase Font Size 1px onclick=increaseFontSizeBy1px()>
<p id=b>Font Size by 1 Pixel</p>
<script>
function increaseFontSizeBy100px() {
document.getElementById('a').style.fontSize = 100px;
}
function increaseFontSizeBy1px() {
var font = document.getElementById('b').style.fontSize;
font++;
}
</script>