在jquery中创建没有id的对话框 [英] create dialog without id in jquery

查看:143
本文介绍了在jquery中创建没有id的对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a query regarding jquery that i want to create a dialog open and then fill some values in it. As i have tried to create a dialog using jquery it uses old values because that div already exists on that page. So i want to create an object of the dialog using jquery and then fill fields in it. I am using jsmarty and jquery together. Thanks

推荐答案

你可以这样做...

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

这篇关于在jquery中创建没有id的对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆