1
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
<script type="text/javascript">
$(function()
{
var w = 700;
var h = 20;
$("#top").css("border","solid black 1px");
$("#top").css("color","red");
$("#top").css("position","relative");
$("#top").css("width",w).css("height",h);
var x = ($(window).width()-w)/2;
var y = ($(window).height()-h)/2;
$("#top").css("margin","0 auto");
$("#top").attr("align","center");
$("#left").css("border","solid black 1px");
w=150;
h=300;
$("#left").css("position","relative");
$("#left").css("width",w).css("height",h);
$("#left").css("float","left");
$("#main").css("border","solid black 1px");
w=800;
h=300;
$("#main").css("position","relative");
//$("#main").css("width",w).css("height",h);
$("#main").css("height",h);
$("#main").css("float","none");
$("#right").css("border","solid black 1px");
w=150;
h=300;
$("#right").css("position","relative");
$("#right").css("width",w).css("height",h);
$("#right").css("float","right");
//$("#frame").css("clear","both");
$("div").css("padding","5px");
//$("#frame > div").css("margin","5px");
$("#frame > div").css("color","red");
$("#clear").css("clear","both");
});
</script>
</head>
<body>
<!-- 最顶层 -->
<div id="top">
hello
</div>
<div id="frame">
<div id="left" >left</div>
<div id="right">right</div>
<div id="main" >main</div>
<div id="clear"></div>
</div>
</body>
</html>