easyui window关闭的两种放法

时间:2024-11-06 07:17:58
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Basic Window - jQuery EasyUI Demo</title>
	<link rel="stylesheet" type="text/css" href="../../themes/default/">
	<link rel="stylesheet" type="text/css" href="../../themes/">
	<link rel="stylesheet" type="text/css" href="../">
	<script type="text/javascript" src="../../"></script>
	<script type="text/javascript" src="../../"></script>
	<script>
		function test(){
			$(".panel-tool-close").click();
		}
	</script>
</head>
<body>
	<h2>Basic Window</h2>
	<p>Window can be dragged freely on screen.</p>
	<div style="margin:20px 0;">
		<a href="javascript:void(0)" class="easyui-linkbutton" οnclick="$('#w').window('open')">Open</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" οnclick="$('#w').window('close')">Close</a>
				<input type="button" value="test" οnclick="test()"/>

	</div>
	<div  class="easyui-window" title="Basic Window" data-options="iconCls:'icon-save'" style="width:500px;height:200px;padding:10px;">
		The window content.
	</div>
</body>
</html>