效果图:
代码:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script src="jquery-3.2.1/jquery-3.2.1.min.js"></script>
<script>
var row_count = 0;
$(function () {
$("#but").click(function () {
row_count++;
var tr = '<tr id ="tri'+row_count+'"><td style="width:800px;height:20px;"> <input type="text" style="