28,391
社区成员
发帖
与我相关
我的任务
分享
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script src="JS/jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="layer/layer.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="button" title="lay" value="弹出Layer" onclick="showLay()" />
</div>
</form>
<script>
$(window).bind('beforeunload', function (e) {
return '确定退出吗?';
})
function showLay() {
layer.open({
type: 1,
skin: 'layui-layer-rim', //加上边框
area: ['420px', '240px'], //宽高
content: 'html内容'
});
}
</script>
</body>
</html>