<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>表格</title>
<style type="text/css">
*{
margin:0;
padding:0;
}
body {
font: 11px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
form {
margin: 20px;
}
table.formdata{
border: 1px solid #5f6f7e;
border-collapse: collapse;
margin-bottom: 20px;
}
table.formdata caption{
padding:0 0 6px 0;
text-align:center;
}
table.formdata th{
border:1px solid #66CCCC;
background: #6699CC;
text-align:center;
font-weight:normal;
padding:2px 8px;
}
table.formdata td{
border:1px solid #66CCCC;
padding:1px 3px;
}
table.formdata td input{
border:none;
width:100px;
}
form .btn{
margin-left:120px;
}
<script language="javascript" type="text/javascript" function hilite(obj)>{
obj:document.get ElementByld("td"+obj.name.to string()):
obj style.boder='2px solid #007eff;'
}
</style>
</head>
<body>
<form method="post">
<table class="formdata">
<caption> 电脑配件价格</caption>
<tr>
<th></th>
<th>2005</th>
<th>2006</th>
<th>2007</th>
<th>2008</th>
</tr>
<tr>
<th>hard disk</th>
<td><input type="text" name="hard disk 2005" id="hard disk 2005" onfocus="hilite(this)" /></td>
<td><input type="text" name="hard disk 2005" id="hard disk 2005" onfocus="hilite(this)" /></td>
<td><input type="text" name="hard disk 2005" id="hard disk 2005" onfocus="hilite(this)" /></td>
<td><input type="text" name="hard disk 2005" id="hard disk 2005" onfocus="hilite(this)" /></td>
</tr>
<tr>
<th>mainboard</th>
<td><input type="text" name="mainboard" id="mainboard" onfocus="hilite(this)" /></td>
<td><input type="text" name="mainboard" id="mainboard" onfocus="hilite(this)" /></td>
<td><input type="text" name="mainboard" id="mainboard" onfocus="hilite(this)" /></td>
<td><input type="text" name="mainboard" id="mainboard" onfocus="hilite(this)" /></td>
</tr>
<tr>
<th>case</th>
<td><input type="text" name="case" id="case" onfocus="hilite(this)" /></td>
<td><input type="text" name="case" id="case" onfocus="hilite(this)" /></td>
<td><input type="text" name="case" id="case" onfocus="hilite(this)" /></td>
<td><input type="text" name="case" id="case" onfocus="hilite(this)" /></td>
</tr>
<tr>
<th>cpu fan</th>
<td><input type="text" name="cpu fan" id="cpu fan" onfocus="hilite(this)" /></td>
<td><input type="text" name="cpu fan" id="cpu fan" onfocus="hilite(this)" /></td>
<td><input type="text" name="cpu fan" id="cpu fan" onfocus="hilite(this)" /></td>
<td><input type="text" name="cpu fan" id="cpu fan" onfocus="hilite(this)" /></td>
</tr>
<tr>
<th>memorydisk</th>
<td><input type="text" name="memorydisk" id="memorydisk" onfocus="hilite(this)" /></td>
<td><input type="text" name="memorydisk" id="memorydisk" onfocus="hilite(this)" /></td>
<td><input type="text" name="memorydisk" id="memorydisk" onfocus="hilite(this)" /></td>
<td><input type="text" name="memorydisk" id="memorydisk" onfocus="hilite(this)" /></td>
</tr>
<tr>
<th>power</th>
<td><input type="text" name="power" id="power" onfocus="hilite(this)" /></td>
<td><input type="text" name="power" id="power" onfocus="hilite(this)" /></td>
<td><input type="text" name="power" id="power" onfocus="hilite(this)" /></td>
<td><input type="text" name="power" id="power" onfocus="hilite(this)" /></td>
</tr>
<tr>
<th>total</th>
<td><input type="text" name="total" id="total" onfocus="hilite(this)" /></td>
<td><input type="text" name="total" id="total" onfocus="hilite(this)" /></td>
<td><input type="text" name="total" id="total" onfocus="hilite(this)" /></td>
<td><input type="text" name="total" id="total" onfocus="hilite(this)" /></td>
</tr>
</table>
<p>
<input type="button" name="btnsubmit" id="btnsubmit" value="Add data" class="btn"/>
<input type="button" name="btnreset" id="btnreset" value="Reset" class="btn"/>
</p>
</form>
</body>
</html>
- 1
- 2
- 3
- 4
- 5
- 6
前往页