<div style=" width: 400px;height: 500px; margin: 0 auto;"> <form action="select.jsp" method="post"> id:<input type="text" name="sid"> <input type="submit" value="查找"> </form> <form action="xiugai.jsp" method="post"> <form action="detele.jsp" method="post"> <table border="1"> <tr> <td>id</td> <td><input type="text" name="id" value="<%=request.getParameter("id")==null?"":request.getParameter("id")%>"/></td> </tr> <tr> <td>name</td> <td><input type="text" name="name" value="<%=request.getParameter("name")==null?"":request.getParameter("name")%>"/></td> </tr> <tr> <td>cid</td> <td><input type="text" name="cid" value="<%=request.getParameter("cid")==null?"":request.getParameter("cid")%>"/></td> </tr> <tr> <td>cname</td> <td><input type="text" name="cname" value="<%=request.getParameter("cname")==null?"":request.getParameter("cname")%>"/></td> </tr> <tr> <td colspan="1" align="left"><input type="submit" value="修改"></td> <td colspan="1" align="right"><input type="submit" value="删除"></td> </tr> </table> <a href ="updata.jsp">添加</a></br> </form> </form> </div>对该代码进行页面美化
时间: 2024-01-03 14:23:04 浏览: 168
可以使用 CSS 对该代码进行美化,例如:
```
<style>
body {
background-color: #f2f2f2;
}
form {
margin: 20px;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
td {
padding: 10px;
text-align: center;
}
input[type="text"],
input[type="submit"] {
padding: 6px;
border-radius: 4px;
border: none;
outline: none;
}
input[type="submit"] {
background-color: #4CAF50;
color: white;
cursor: pointer;
margin-right: 10px;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
a {
color: #4CAF50;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
```
将上述 CSS 代码放在 HTML 页面的 head 标签内,即可美化页面。
阅读全文