码迷,mamicode.com
首页 > 其他好文 > 详细

公告显示为提示层

时间:2017-06-15 20:27:24      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:charset   公告   blog   padding   function   cti   children   .com   hello   

<!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>

  

公告显示为提示层

标签:charset   公告   blog   padding   function   cti   children   .com   hello   

原文地址:http://www.cnblogs.com/bchome/p/7019658.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!