📄 index.jsp~8~
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" type="text/css" rel="stylesheet">
<title>Struts实现SQL Server数据库的添加</title>
</head>
<script language="javascript" type="">
function Mycheck(){
if (userInfoActionForm.name.value=="")
{ alert("请输入姓名!");userInfoActionForm.name.focus();return false;}
if (userInfoActionForm.age.value=="")
{ alert("请输入年龄!");userInfoActionForm.content.focus();return false;}
if (userInfoActionForm.sex.value=="")
{ alert("请输入性别!");userInfoActionForm.sex.focus();return false;}
if (userInfoActionForm.profession.value=="")
{ alert("请输入职业!");userInfoActionForm.profession.focus();return false;}
return true;
}
</script>
<body background="b01.jpg"><br>
<p align="center">应用SQL Server数据库实现添加用户基本信息</p>
<html:form action="userInfoAction.do" onsubmit="return Mycheck()">
<table width="481" border="0" align="center">
<tr>
<td width="60" height="30">姓名</td>
<td width="166"></td>
<td width="60">年龄</td>
<td width="173"><html:text property="age"></html:text></td>
</tr>
<tr >
<td height="30">性别</td>
<td><html:text property="sex"></html:text></td>
<td>职业</td>
<td><html:text property="profession"></html:text></td>
</tr>
</table><br>
<div align="center">
<input type="submit" name="Submit" value="添加">
</div>
</html:form>
<p align="center">
<%if(request.getAttribute("messger")!=null){
out.print(request.getAttribute("messger"));
}%>
</p>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -