jQuery UI dialog button text as a variable

后端 未结 12 1813
隐瞒了意图╮
隐瞒了意图╮ 2020-12-13 01:21

Can anyone tell me how can i use a variable for button text in jQuery UI dialog? I want to make a dynamic button name.

12条回答
  •  半阙折子戏
    2020-12-13 01:59

    This will work $($("button", $("#dialogId").parent())[NUMBER_OF_YOUR_BUTTON]).text("My Text");

提交回复
热议问题