<!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>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title>DIV拖动</title>
</head>
<body>
<script type="text/javascript" src="dialog.js"></script>
<script type="text/javascript">
var dialog = new Dialog("dialog");
dialog.initDialog();
dialog.close();
dialog.closeBlock();
function show(){
dialog.setDialogSize("220px","220px");
dialog.setDefaultSize();
dialog.setBlockAlpha(50);
dialog.setCenter();
dialog.setTitleContent('标题栏(可拖动)<input onclick="dialog.maximizeOrdeoxidize()" value="maxormin" type ="button" /><input onclick="dialog.close();dialog.closeBlock()" value="close" type ="button" />');
dialog.setBodyContent("内容区");
dialog.setBackground("#C0C0C0");
dialog.setTitleBackground("#C8E0FB");
dialog.setBodyBackground("#C844FB");
dialog.close();
dialog.setBlockColor("#000000");
dialog.closeBlock();
dialog.showBlock();
dialog.show();
dialog.setLimitPosition();
}
inputWinCallback = function(obj){
if(obj == "")
inputWin("请输入退回原因","");
else
infoWin("输入成功",obj);
}
</script>
显示自己定义的窗口:
<input type="button" value="显示窗口" onclick="show()" >
测试控件提供的方法:
<input type='button' value='alert' onclick='alert("我是标题");' />
<input type='button' value='infoWin' onclick='infoWin("我是标题","我是内容");' />
<input type='button' value='inputWin' onclick='inputWin("请输入退回原因","");' />
</body>
</html>
评论22
最新资源