52,797
社区成员
发帖
与我相关
我的任务
分享
var count = 0;
function showAddQuizShowWindow(){
//省略
var addWindow = new Ext.Window({
id:'win'+count,
contentEl:"addQuizShowWindow",//主体显示的html元素,也可以写为el:"win"
title:'增加脑筋急转弯题目',
modal:true,
width:600,
minWidth:600,
autoHeight:true,
items:[frm],
iconCls:"icon"
});
addWindow.show();
count++ ; // 这样可以使每次new 出来的 window 都不是同一个 id。
};
function showAddQuizShowWindow(){
//省略
var addWindow = new Ext.Window({
contentEl:"addQuizShowWindow",//主体显示的html元素,也可以写为el:"win"
title:'增加脑筋急转弯题目',
modal:true,
width:600,
minWidth:600,
closeAction: 'hide', //此属性默认是'close',这里需要修改成'hide',其他无需修改。
autoHeight:true,
items:[frm],
iconCls:"icon"
});
addWindow.show();
};
jsp
<input type="button" onclick=showAddQuizShowWindow(); value="增加脑筋急转弯"
class="button" />
<br>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="t.aspx.cs" Inherits="t" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="Ext/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script src="Ext/adapter/ext/ext-base.js" type="text/javascript"></script>
<script src="Ext/ext-all.js" type="text/javascript"></script>
<script>
function showAddQuizShowWindow() {
//省略
var addWindow = new Ext.Window({
title: '增加脑筋急转弯题目',
modal: true,
width: 600,
minWidth: 600,
autoHeight: true
});
addWindow.show();
};
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="button" onclick=showAddQuizShowWindow(); value="增加脑筋急转弯" />
</div>
</form>
</body>
</html>