<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>删除元素</title>
<script src="jquery-1.8.0.js"></script>
</head>
<style type="text/css">
</style>
<script type="text/javascript">
$(function(){
$("ul li:first").css("font-weight","bold");
$("#Button1").click(function(){
//$("ul li").remove("li[title=t]");
$("ul li:eq(1)").remove();
});
});
</script>
<body>
<ul>
<li>学号</li>
<li title="t">1001</li>
<li>1002</li>
<li>1003</li>
<li style="text-align:center;padding-top:5px">
<input type="button" id ="Button1" value="删除" class="btn" />
</li>
</ul>
</body>
</html>
删除元素
最新推荐文章于 2022-09-05 20:19:43 发布