Changing the value of a jQuery mobile button using jQuery

前端 未结 7 1430
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 04:49

Wondering if you can help me out. I seem to have a problem changing the text of my jQuery Mobile buttons with jQuery.

$(\"#myButton .ui-btn-text\").text(\"New te         


        
7条回答
  •  一个人的身影
    2021-02-05 05:14

    [deprecated]

    Using button inputs has this drawback of not being able to change the attributes of an input in a way that would propagate to jquerymobile's button. Then there is only ne way:

    $('#myButton').parent().find('.ui-btn-text').text('zzzzz');

    If the input button is not necessary to use the application without any javascript present (or you don't want it to work without javascript) then you should always use tags, because they can be containers.

提交回复
热议问题