Home > Backend Development > PHP Tutorial > 请教jquery怎么删除当前列

请教jquery怎么删除当前列

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:41:56
Original
953 people have browsed it

请问jquery如何删除当前列?

<script type="text/javascript"src="js/jquery.js"></script><br /><link href="css/tablecloth.css" rel="stylesheet" type="text/css" media="screen" /> <br /><script type="text/javascript" src="js/tablecloth.js"></script><br /><?php<br />require('inc/page.class.php');<br />require("inc/pdo.php");<br />$selectSpecialContent=$dbc->prepare("select * from naszt");<br />$selectSpecialContent->execute();<br />?><br /><table align="center" cellspacing="0" cellpadding="0"><br /><tr><br /><th>专题名称</th><br /><th>专题类型</th><br /><th>发表时间</th><br /><th>发表ip</th><br /><th>操作</th><br /></tr><br /><?php while($row=$selectSpecialContent->fetch()){ ?><br /><tr id="<?php echo $row['id']?>"><br /><td><?php echo $row['ztname']?></td><br /><td><?php echo $row['zttype']?></td><br /><td><?php echo $row['zttime']?></td><br /><td><?php echo $row['publiship']?></td><br /><td><button><a href="ztselect.php?id=<?php echo $row['id']?>">查看</a></button><button><a href="upzt.php?act=up&id=<?php echo $row['id']?>">修改</a></button><button id="del"><a href="selectzt.php?act=del&id=<?php echo $row['id']?>">删除</a></button></td><br /></tr><br /><?php }; ?><br /></table><br /><script><br />$(document).ready(function(){<br />$("#del").click(function(){<br />var q=$("tr").attr("id");<br />alert(q);<br />});<br />});<br /></script>
Copy after login

本来是想在tr 加个id 获取到这个id的值删除本行 但好像不行,请教高手

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template