:
After clicking Delete
<! DOCTYPE html>"UTF-8"> <title></title> <script type="Text/javascript"Src=".. /js/jquery-3.2.1.min.js"></script> #table {border:1px solid #ABCDEF; border-collapse:collapse;width:600px;} th{border:1px solid #ABCDEF;} td{border:1px solid #ABCDEF; text-Align:center;} Th a{margin-right:5px; color: #C7254E;} tr{height:30px;} . Popdiv{margin-top:100px;width:500px;padding:10px;border:1px solid Red;position:absolute; Left: -%;margin-left: -250px;background-color: #FFFFFF;d isplay:none;z-index:4;} . Popdiv P{border-bottom:1px solid red; } </style> <body> <table id="Table"> <tr> <th> name </th> <th> age </th> &L t;th> jobs </th> <th> Payroll </th> <th> Operations </th> </tr> <tr> <th> Zhang San </th> <th> at</th> <th> Engineers </th> <th>6000</th> <th><a href="#" class="View"> View </a><a href="#" class="del"> Delete </a><a href="#"> Modify </a></th> </tr> <tr> <th> John Doe </th> ; <th> at</th> <th> Engineers </th> <th>6000</th> <th><a href="#" class="View"> View </a><a href="#" class="del"> Delete </a><a href="#"> Modify </a></th> </tr> <tr> <th> Harry </th> ; <th> at</th> <th> Engineers </th> <th>6000</th> <th><a href="#" class="View"> View </a><a href="#" class="del"> Delete </a><a href="#"> Modify </a></th> </tr> </table> <divclass="Popdiv"> <p><strong> name:</strong><span></span></p> <p><stron G> Age:</strong><span></span></p> <p><strong> jobs: </strong><span> ;</span></p> <p><strong> Salary:</strong><span></span></p> <a href="#" class="Close">close</a> </div> </body> <script>//View$('. View'). Click (function () {//Gets the width and height of the page so that the mask layer fills the page varmaskheight=$ (document). Height (); varMaskwidth=$ (document). width (); //Mask Layer$('<div class= "Mask" ></div>'). AppendTo ($ ('Body')); $('Div.mask'). css ({'Opacity':0.4, 'background':'#000', "position":'Absolute', " Left":0, 'Top':0, "width": Maskwidth,"Height": Maskheight,'Z-index':2 }) vararr = []; $( This). Parent (). siblings (). each (function () {Arr.push ($ ( This). text ()); }) $(". Popdiv"). Show (). Children (). Each (function (i) {$ ( This). Children ('span'). Text (Arr[i]); }) $('. Close'). Click (function () {$ ( This). Parent (). Hide (); $('. Mask'). Remove (); }); }) //Delete$('. del'). Click (function () {$ ( This). Parents ('TR'). Remove (); }) </script>jquery Implementation View Delete