easyUI--panel

a)       注意事项: 在引入easyUI包之后, 尽量少使用: open, close等系统方法, 否则可能会照成兼容性问题

b)       如不使用easyUIloader, 那么在使用easyUI中基本上导入以下几个JS和CSS就够了:

         

<link rel="stylesheet" href="../jquery-easyui-1.3.1/themes/icon.css" type="text/css"></link>
<link rel="stylesheet" href="../jquery-easyui-1.3.1/themes/default/easyui.css" type="text/css"></link>
<script type="text/javascript" src="../jquery-easyui-1.3.1/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="../jquery-easyui-1.3.1/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../jquery-easyui-1.3.1/locale/easyui-lang-zh_CN.js"></script>


本人测试例子

<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>jQuery EasyUI demo</title>

		<link rel="stylesheet" href="../jquery-easyui-1.3.1/themes/icon.css" type="text/css"></link>
		<link rel="stylesheet" href="../jquery-easyui-1.3.1/themes/default/easyui.css" type="text/css"></link>
		<script type="text/javascript" src="../jquery-easyui-1.3.1/jquery-1.8.0.min.js"></script>
		<script type="text/javascript" src="../jquery-easyui-1.3.1/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../jquery-easyui-1.3.1/locale/easyui-lang-zh_CN.js"></script>
	</head>
	<script type="text/javascript">
	$(function() {
		$("#pppp").panel({
			onBeforeOpen : function() {
				alert(1);
				return false;
			}
		});
	});

	function open1() {
		$("#pppp").panel("open");
	}

	function close1() {
		$("#pppp").panel("close");
	}

	function destroy1() {
		$("#pppp").panel("destroy");
	}
</script>
	<body>
		<div id="pppp" class="easyui-panel" title="My Panel"
			style="width: 500px; height: 150px; padding: 10px; background: #fafafa;"
			data-options="iconCls:'icon-add',closable:true, closed:false,  
                collapsible:true,minimizable:true,maximizable:true">
			<p>
				panel content.
			</p>
			<p>
				panel content.
			</p>
		</div>
		<br />
		<input type="button" οnclick="open1();" value="open" />
		<br />
		<input type="button" οnclick="close1();" value="close" />
		<br />
		<input type="button" οnclick="destroy1();" value="destroy" />
		<br />
	</body>
</html>



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值