JQuery get the title of a button

前端 未结 8 1167
遇见更好的自我
遇见更好的自我 2020-12-30 18:33

I have a button:


Which makes this:

相关标签:
8条回答
  • 2020-12-30 19:19

    This worked for me on chrome.

    $("#your-button-id").val();
    
    0 讨论(0)
  • 2020-12-30 19:21

    You can get it by using .text(),

    $('button').text();
    

    Please read here to know more about it.

    0 讨论(0)
提交回复
热议问题