Why am I getting this error?
- by Doug
function changeSize( fontsize ) {
var body = document.getElementById("body");
var font = fontsize + "-font";
body.className = font;
}
<input type="button" onclick="changeSize(small)" value="Small" />
Firefox console keeps saying that small is undefined. What am I doing wrong?