js
1 function DeleteTrademark(obj) { 2 if (obj) { 3 //通过获取到的obj(方法自带本身)实现删除本身标签li 4 obj.remove(); 5 } 6 }
.cshtml
1 <div class="secect_r"> 2 <div class="top_right"> 3 <ul> 4 <li class="list1"><img src="~/MvcImages/ycysqd/sx_03.gif" /><p>筛选</p></li> 5 <li class="list2"><a href="">集成电路</a>>></li> 6 @*<li class="list3"><a>INFINEON</a><span>×</span></li> 7 <li class="list3"><a>100-1000件</a><span>×</span></li> 8 <li class="list3"><a>国内</a><span>×</span></li>*@ 9 </ul> 10 <div class="r1"><h1>型号:</h1><div class="text1"><input id="typeofproduct" type="text" value="输入型号" /></div></div> 11 <div class="r2"><h1>品牌:</h1><div class="text2" id="r2_text2"><h2 class="cur1">全部</h2><h2>FTDI</h2><h2>WIINET</h2><h2>3M-STATIC CONTROL SOLUTIONS</h2><h2>AAVID THERMALLOY</h2><h2>ALLIANCE</h2><a href="javascript:void(0);" id="more_r2" onclick="More_r2()">更多+</a></div><div class="text2" id="r2_text2_2" style="display:none"></div></div> 12 <div class="r3"><h1>库存数量:</h1><div class="text1"><input type="text" class="ChangeInventoryquantity" id="startnumber" value="1000" /></div><a>-</a><div class="text2"><input class="ChangeInventoryquantity" id="endnumber" type="text" value="1000000" /></div><a>件</a></div> 13 <div class="r4"><h1>交货地:</h1><div class="text2"><h2 class="cur1">全部</h2><h2 onclick="Trademark(this)">国内</h2><h2 onclick="Trademark(this)">香港</h2></div></div> 14 </div> 15 16 </div>