哎呀,网页好乱,怎么摆都摆不好。。。
好烦,想去吃饭。
这就不能正常点吗?
能,你需要<table>
虽然table标签不是专门的网页规划的标签,但是它很方便
<%@ page import="java.sql.*" 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>登录界面</title>
</head>
<body>
<center>
<h1 style="color:red">登录</h1>
<form id="indexform" name="indexForm" action="indexcheck.jsp" method="post">
<table border="0">
<tr>
<td>
身份:
</td>
<td>
<input type="radio" name="shenfen" value="房东">房东 <input type="radio" name="shenfen"value="租户">租户
</td>
<tr>
<td>
账号:
</td>
<td>
<input type="text" name="username">
</td>
</tr>
<tr>
<td>
密码:
</td>
<td>
<input type="password" name="password">
</td>
</tr>
</table>
<br>
<input type="button" value="注册" οnclick="window.location.href='register.jsp'" style="color:#BC8F8F">
<input type="submit" value="登录" style="color:#BC8F8F">
</form>
</center>
</body>
</html>
页面一下就好看了不少(虽然还是难看)。。
另外要让页面居中你需要<center>标签。
OK!