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
Post a Comment