<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
a{text-decoration:none;}
div{margin:0px auto;height:25px;width:720px;}
table{width: 500px;border: 1px solid gray;border-collapse: collapse;margin:50px auto;}
th,td{line-height: 35px;border: 1px solid gray;text-align: center;}
</style>
</head>
<body>
<div>
<label for="on">姓名:</label><input type="text" id="on">
<label for="oa">年龄:</label><input type="text" id="oa">
<label for="oz">住址:</label><input type="text" id="oz">
<button id="bon">添加</button>
</div>
<script type="text/javascript">
//查找节点
var n1=docum
js节点对象操作--------输入个人信息加载表格中并实现删除功能
最新推荐文章于 2023-01-15 21:11:26 发布
本文介绍了如何使用JavaScript动态地将用户输入的个人信息填充到HTML表格中,并详细讲解了实现删除表格行的功能。通过实例代码展示了DOM节点操作的基本技巧,包括获取元素、创建新节点、插入节点以及删除节点的方法。
摘要由CSDN通过智能技术生成