亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

沒反應???

沒反應???

Blizzard_lihe 2016-11-19 11:15:55
<!DOCTYPE?html> <html> <head> <meta?charset="UTF-8"> <title>Document</title> <script?src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script> <style?type="text/css"> .left, .right{ width:?300px; } .left?div, .right?div{ width:?100px; height:90px; padding:?5px; margin:?5px; float:?left; border:?1px?solid?#ccc; } .left?div{ ??background:?#bbffaa; } .right?div{ background:?yellow; } </style> </head> <body> ?????<h2>通過empty與remove移除元素</h2> ?????<div> ??????<button?id="bt1"> ??????點擊通過jQuery的empty移除內部的P元素 ??????</button> ??????<button?id="bt2"> ????????點擊通過jQuery的remove移除整個節點 ??????</button> ?????</div> <div> <div?id="test1"> <p>p元素1</p> <p>p元素2</p> </div> <div?id="test2"> <p>p元素3</p> <p>p元素4</p> </div> </div> <script?type="text/javascript"> $("bt1").on('click',function(){ $("#test1").empty() }) ?????$("#bt2").on('click',function(){ ??????$("test2").remove() ?????}) </script> </body> </html>沒反應啊???
查看完整描述
  • 3 回答
  • 0 關注
  • 1663 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號