打开一个新页面作为模式窗口
Open a new page as modal window
我有以下代码,如果行存在,如何打开另一个页面作为模态窗口弹出窗口?
function editLesson(){
var row = $('#dg').datagrid('getSelected');
if (row){
// would like to open another page as modal window
}
}
任何帮助都是非常可观的。
你可以使用fancybox插件。 这是一个非常棒的插件。http://fancybox.net/(心灵花式盒子2也出来了)
http://jsfiddle.net/kasperfish/5EV8r/109/
$.fancybox('hello');
您还可以在花式框(模态)窗口中加载iframe。http://jsfiddle.net/kasperfish/5EV8r/110/
$.fancybox([
'url'//url to your page
], {
'padding' : 10,
'type' : 'iframe',//set type to iframe
'overlayOpacity' : 0.7,
'overlayColor' : 'black',
'speedIn' : 900,
'speedOut' : 400,
'width' : '70%',
'height' : '50%'
});
您可以使用 JQuery 对话框
如下所述:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function() {
$( "#dialog" ).dialog();
});
</script>
</head>
<body>
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
</body>
</html>
http://jqueryui.com/dialog/
相关文章:
- 在检查单选按钮的值是否正确后,如何将其带到新页面
- 在Phonegap中重定向到新页面后,AdMob未定义
- ASP.NET MVC 3-在ajax调用后,重定向到新页面或生成页面刷新
- javascript:发送带有音频文件的POST,然后重定向到新页面
- 在onclick上动态创建新页面
- 如何将缩略图链接到新页面上的视频
- Javascript:在新页面中打开链接并运行脚本
- 视频暂停超过1分钟后重定向到新页面
- 在新页面中打开url的Javascript
- 防止 PHP 在新页面中显示结果
- 如何在边缘脚本完成后将用户定向到新页面
- 超链接单击以加载新页面并执行JavaScript
- 导航到新页面不会滚动到顶部
- 如何发布请求并将响应呈现为新页面
- 如何使用自动表单和iron路由器重定向到新页面
- 如何在发送时不打开新页面的情况下使用php/ajax发送表单
- 在RadWindow中加载新页面,然后从加载的窗体中关闭窗口
- 在IE11中,点击next或back按钮,使用intro.js打开一个新页面
- 使用弹出模式中断k-pager-nav以确认/拒绝移动到新页面
- 打开一个新页面作为模式窗口