gpt4 book ai didi

jquery - 是否可以将字符串传递给jquery中的dialog()

转载 作者:行者123 更新时间:2023-12-01 02:06:59 24 4
gpt4 key购买 nike

我有一个关于 dialog() 的问题Jquery 的功能。我想知道是否可以将它与前面的选择器一起使用,就像这样

$('#dialog').dialog(open)
....

<div id="dialog" title="Dialog Title">
<p>Dialog Test</p>
</div>

如果我能通过"<p>Dialog Test</p>"以某种方式将其作为纯字符串?

最美好的祝愿

最佳答案

    $('<p></p>').dialog({
autoOpen:true,
show: "fold",
hide: "explode",
resizable: false,
modal: true,
closeOnEscape: true,
height: 135,
width: 400,
title: 'Dialog test',
buttons:{
"Ok":function(){
$(this).dialog("close");
}
},
close:function(){
//$(this).dialog("destroy");
}

});

关于jquery - 是否可以将字符串传递给jquery中的dialog(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10667523/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com