公告显示为提示层

<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>开始使用layer</title>
<script type="text/javascript" src="http://www.cpw998.com/c9/Public/static/js/lib/jquery.min.js"></script>
<script type="text/javascript" src="http://www.cpw998.com/c9/Public/static/layer/layer.js"></script>
<script>
//弹出一个页面层
//弹出一个页面层
$(document).ready(function(){
	$(".info_title").click(function(){
		ggtitle=$(this).children("#ggtitle").text();
		infoCnt =$(this).siblings(".info_cnt").text();
	  layer.open({
	  type: 1,
	  area: ['600px', '360px'],
	  shadeClose: true, //点击遮罩关闭
	  title:ggtitle,
	  content: '\<\div style="padding:20px;">'+ infoCnt +'\<\/div>'
	  });
		
	});	
});

</script>
</head>
<body>

<div class="info_title">ddd<span id="ggtitle">提示标题</span></div>
<div class="info_cnt" style="display:none;"><b>hello word</b></div>
</body>
</html>

  

posted @ 2017-06-15 19:37  百草之家  阅读(183)  评论(0编辑  收藏  举报