Wednesday, July 29, 2015

How to change the name of the button using Jquery

<input type='button' value='Add' id='btnAddProfile'>
$("#btnAddProfile").attr('value', 'Save'); //versions older than 1.6

<input type='button' value='Add' id='btnAddProfile'>
$("#btnAddProfile").prop('value', 'Save'); //versions newer than 1.6

<button id='btnAddProfile' type='button'>Add</button>
$("#btnAddProfile").html('Save');

No comments:

Post a Comment