Answers for "jquery replace text in button"

1

jquery replace text in button

$("#thebutton span").text("My NEW Text");
Posted by: Guest on August-27-2021
0

jquery replace text in button

<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

<!-- Different button types-->

<button id='btnAddProfile' type='button'>Add</button>
$("#btnAddProfile").html('Save');
Posted by: Guest on August-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language