0
.click isn't actually part of JavaScript itself. It's part of a JavaScript library called jQuery
If you use jQuery, this is what your code should look like:
function addChar(input, character) {
if (input.value == null || input.value == "0")
input.value = character
else
input...