jQuery EasyUI怎么d出一个新窗口

jQuery EasyUI怎么d出一个新窗口,第1张

1、你肯定会有一个按钮点击事件Onclick()之类的,点击可以d出dialog,还会有一个div加载需要dialog的需要的数据等。

2、$("#divId").dialog({

里面类似easyui的dialog

})

3.点击事件在js添加一个$("#divId").dialog("open")

这个的解决方法其实挺简单的。

只要在最外面的框架页面加个div,然后用parent.div的id就可以的。但是必须得d出框得是一个页面。

<div id="div_info"></div>

//外层d出框1

function openFirstWin(url, title, width, height) {

var strWidth

var strHeight

if (width == null)

strWidth = 800

else

strWidth = width

if (height == null)

strHeight = 500

else

strHeight = height

if (url != null) {

//var content = '<iframe name=\"first\" scrolling=\"auto\" frameborder=\"0\" src=\"' + url + '\" style=\"width:100%\height:100%\\"></iframe>'

var content = createIFrame(url)

parent.$('#div_info').window({

close: false,

modal: true,

draggable: false,

title: title,

animate: true,

content: content,

minimizable: false,

width: strWidth,

height: strHeight,

top: (parent.$(parent.window).height() - height) * 0.5,

left: (parent.$(window).width() + 200 - strWidth) * 0.5

})

}

return false

}

利用jquery easyui设置对话框的方法:

1、创建对话框:

<div id="dd" class="easyui-dialog" title="My Dialog" style="width:400pxheight:200px"

     data-options="iconCls:'icon-save',resizable:true,modal:true">

 Dialog Content.

</div>

2、运行效果:

3、支持设置属性如下:


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11556249.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-17
下一篇2023-05-17

发表评论

登录后才能评论

评论列表(0条)

    保存