在jquery中创建没有id的对话框

1 javascript jquery dialog

我有一个关于jquery的查询,我想创建一个对话框,然后在其中填充一些值.由于我尝试使用jquery创建对话框,因此它使用旧值,因为该div已存在于该页面上.所以我想使用jquery创建对话框的对象,然后填充其中的字段.我一起使用jsmarty和jquery.谢谢

Jer*_*eir 5

你可以做这样的事......

var jDialogContainer = $(document.createElement("div"));
// add anything to jDialogContainer you want
jDialogContainer.html("hello");
jDialogContainer.dialog({/*options go here*/});
Run Code Online (Sandbox Code Playgroud)