All of your buttons are making calls to the JS
uppass()
method, but how do you identify which of the buttons made the click? You can add support for this by adding a parameter to your method:
function uppass (key) {
Then you can pass the value in when the button is clicked. You can either do it manually:
<button .. onclick="uppass('c')">
Or you can use the
id
attributes you've added to your buttons:
<button id="c" .. onclick="uppass(this.id)">
JavaScript Function Parameters[
^]
Functions - JavaScript | MDN[
^]