参考链接:http://stackoverflow.com/questions/5580616/jquery-change-button-text

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

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

<!-- Different button types-->

<button id='btnAddProfile' type='button'>Add</button>
<script>
$("#btnAddProfile").html('Save'); // 支持修改图标
$("#btnAddProfile").text('Save'); // 只支持修改文本
</script>

 

相关文章:

  • 2022-01-09
  • 2022-12-23
  • 2021-05-20
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-08
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2021-07-24
相关资源
相似解决方案