js节点对象操作--------输入个人信息加载表格中并实现删除功能

本文介绍了如何使用JavaScript动态地将用户输入的个人信息填充到HTML表格中,并详细讲解了实现删除表格行的功能。通过实例代码展示了DOM节点操作的基本技巧,包括获取元素、创建新节点、插入节点以及删除节点的方法。
摘要由CSDN通过智能技术生成
<!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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值