我有一个工作对话框,我想在应用程序流程中更改内容,我的意思是更改对话框的 .html() 属性...
我认为这很容易做到,但我似乎做不到:
$dialog.dialog().html(一些内容);
在对话框运行后我该如何执行此操作?
我的初始化代码是:
var $dialog = $('<div></div>')
.html(SplitTable)
.dialog({
autoOpen: false,
height: 500,
width: 600,
title: 'פיצול שולחן'});
$dialog.dialog('open');
ID在哪里?这是我从示例中理解应该做的事情,没有看到任何 Id 属性...
附: splitTable 是我在编程到updatTable期间需要更改的内容...
10x
最佳答案
确保 $dialog
变量位于您要更改内容的范围内,然后只需 .html()
调用将起作用,如下所示:
$dialog.html(updatTable);
关于javascript - 如何在初始化后更改 jQuery 对话框 html 内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3780695/