日期:2014-05-16 浏览次数:20437 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link rel="stylesheet" href="boxy.css" type="text/css" />
<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="jquery.boxy.js"></script>
<script type="text/javascript">
$(function(){
$(".boxy").boxy();
});
function closeBoxy()
{
$('.boxy-wrapper').hide();
}
</script>
</head>
<body>
<a href="#foobar" title="弹出层" class="boxy">弹出层</a></p>
<div id="foobar" style="padding:15px; display:none; background-color:#cad5eb; font-size:2em; color:#000000; font-weight:bold;"><div style="width:600px;height:600px"><input name="aaa" />这是一段ID为foobar的div标签内的文字</div></div>
<a href="javascript:void(0)" onclick="closeBoxy()">关闭我</a>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link rel="stylesheet" href="boxy.css" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.boxy.js"></script>
<script type="text/javascript">
var box;
$(function(){
box = new Boxy($("#foobar"), {show:false});
});
function openBoxy(){
box.show();
}
function closeBoxy()
{
box.hide();
}
</script>
</head>
<body>
<a href="javascript:openBoxy();void(0);" title="弹出层">弹出层</a>
<a href="javascript:closeBoxy();void(0);">关闭我</a>
<div id="foobar" style="padding:15px; display:none; background-color:#cad5eb; font-size:2em; color:#000000; font-weight:bold;">
<div style="width:600px;height:300px">
<input name="aaa" />这是一段ID为foobar的div标签内的文字
</div>
</div>
</body>
</html>