javascript - Adding number to p.value -


here's fiddle. i'm trying make when press button, adds 1 #num.

js:

$(document).ready(function () {     $('#b').button({         icons: {             secondary: '.ui-icon-triangle-1-n'         }     });     $('#b').click(function () {         var x = '#num'.value;         var u = x + 1;         document.getelementbyid('#num').innerhtml = u;     }); }); 

try .it should work

$(document).ready(function () {     $('#b').button({         icons: {             secondary: '.ui-icon-triangle-1-n'         }     });     $("#b").click(function () {         var x = parseint($('#num').html());         var u = x + 1;         $('#num').html(u);     }); }); 

Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -