1.在表格中插入一行
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
table{
border:1px solid red;
}
td{
border:1px solid blue;
}
</style>
</head>
<body>
<table id="tab">
</table>
<input type="button" value="增加一行" onclick="add()">
<script>
function add() {
var tab = document.getElementById("tab");
tr = tab.insertRow(0);//在第一行前面插入
var td = tr.insertCell(0);
td.innerHTML = "第一列";
var td2 = tr.insertCell(1);
td2.innerHTML = "第二列";
}
</script>
</body>
</html>
输入4位后自动聚焦在下一输入框
设置cookie有效期
动态添加br