<div style="width: 600px;">
<div id="update_1" style="float:left;width: 100px;" ><input type="button" name="Submit2" value="" onCLick="checkForm()"></div>
<div style="float:left;width: 100px;"><input type="button" name="Submit3" value="" onClick="javascript:window.location.replace("../blank.html");"></div>
<div style="float:left;width: 100px;"><input type="reset" name="Reset" value=""></div>
</div>
as above, the three internal div are arranged horizontally, and the effect is still vertical
I don"t know what"s wrong, solve
the complete code is shown below
<%@ page language="java" import="java.util.*,java.text.SimpleDateFormat" pageEncoding="UTF-8"%>
<html>
<%
String contextPath = request.getContextPath();
%>
<script>
function checkForm() {
if (employAddForm.EmployName.value == "") {
alert ("");
document.employAddForm.EmployName.focus();
return false;
}
if (employAddForm.EmployRealName.value == "") {
alert ("");
document.employAddForm.EmployRealName.focus();
return false;
}
if (employAddForm.EmployPWD.value == "") {
alert ("");
document.employAddForm.EmployPWD.focus();
return false;
}
if (employAddForm.EmployPWD.value != employAddForm.EmployPWD2.value) {
alert ("2");
document.employAddForm.EmployName.focus();
return false;
}
// if (document.employAddForm.EmployMPhone.value.length!=11) {
// alert("11");
// document.employAddForm.EmployMPhone.focus();
// return false;
// }
document.employAddForm.action = "<%=request.getContextPath() %>/EmployAction";
document.employAddForm.submit();
}
</script>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<style type="text/css">
<!--
.style1 {font-size: 16px}
-->
</style>
</head>
<body topmargin="0" leftmargin="0">
<div align="center"><font color=-sharpFF0000>${requestScope.msg } </font></div>
<form name="employAddForm" method="post" action="<%=request.getContextPath() %>/EmployAddAction">
<div align="center"><font color=-sharp000000></font></div>
<table width="800" border="0" align="center">
<tr>
<td width="83"><span class="style1">:</span></td>
<td width="323"><span class="style1">
<input type="text" name="EmployName">
</span><br><span name="div41" id="div41"></span></td>
<td width="85"><span class="style1">:</span></td>
<td width="291"><span class="style1">
<input type="text" name="EmployRealName">
</span></td>
</tr>
<tr>
<td><span class="style1">:</span></td>
<td><span class="style1">
<input type="password" name="EmployPWD" >
</span></td>
<td><span class="style1"> :</span></td>
<td><span class="style1">
<label>
<input type="radio" name="EmploySex" value="" checked>
</label>
<label>
<input type="radio" name="EmploySex" value="">
</label>
<label></label>
</span></td>
</tr>
<tr>
<td><span class="style1">:</span></td>
<td><span class="style1">
<input type="password" name="EmployPWD2" >
</span></td>
<td><span class="style1">:</span></td>
<td><span class="style1">
<select name="EmployClass">
<option value="0">0-</option>
<option value="1">1-</option>
<option value="2" selected>2-</option>
</select>
</span></td>
</tr>
<tr>
<tr>
<td><span class="style1">:</span></td>
<td><span class="style1">
<input type="text" name="EmployIDNum">
</span></td>
<td><span class="style1">:</span></td>
<td><span class="style1">
<input type="text" name="EmployMPhone">
</span></td>
</tr>
<tr>
<td><span class="style1"> :</span></td>
<td colspan="3"><span class="style1">
<input name="EmployAddress" type="text" value="">
</span></td>
</tr>
<tr>
<td><span class="style1"></span></td>
<td colspan="3"><div align="center">
<div style="width: 600px;">
<div id="update_1" style="float:left;width: 100px;" ><input type="button" name="Submit2" value="" onCLick="checkForm()"></div>
<div style="float:left;width: 100px;"><input type="button" name="Submit3" value="" onClick="javascript:window.location.replace("../blank.html");"></div>
<div style="float:left;width: 100px;"><input type="reset" name="Reset" value=""></div>
</div>
<%
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String date = sdf.format(new Date());
%>
<input type="hidden" name="EmployDate" value="<%=date%>">
<p class="style1">
</div></td>
</tr>
</table>
</form>
<iframe name="iframe1" id="iframe1" width="0" height="0" scrolling=auto >
</iframe>
</body>
</html>