代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<title></title>

<style>
#tab
{
border
:1px solid #aaa;
border-collapse
:collapse;
width
:80%;
}
#tab th
{
border
:1px solid #aaaaaa;
background
:#ECE9D8;
border-collapse
:collapse;
padding
:5px;
text-align
:left;
}
#tab td
{
border
:1px solid #d8d8d8;
border-collapse
:collapse;
padding
:5px;
}
.txt
{
border
:1px solid #888;
background
:#ECE9D8;
}
.checkBg
{
border
:1px solid #aaaaaa;
background
:#ECE9D8;
}
.checkTxt
{
border
:1px solid #aaa;
background
:##d8d8d8;
}
.button
{
border
:1px solid #888;margin:5px 0px;
width
:80px;background:#ECE9D8;height:22px;line-height:22px;
}
</style>
<script language="javascript" type="text/javascript">
/*
author:kevin
email:kevin_218@163.com
msn:xiao-kevin@hotmail.com
website:http://www.bluekevin.com
*/
function $(id) {return document.getElementById(id);}
function $F(name){return document.getElementsByTagName(name);}

function add(){
var otr = document.getElementById("tab").insertRow(-1);
var checkTd=document.createElement("td");
checkTd.innerHTML
= '<input type="checkbox" class="check" onclick="ccolor()" name="checkItem">';
var otd1 = document.createElement("td");
otd1.innerHTML
= '<input type="text" class="txt" name="infoName_txt" >

 

相关文章: