Chạy ❯
Nhận trang web của
riêng
bạn
×
Thay đổi định hướng
Lưu mã
Thay đổi chủ đề, Tối/Sáng
Đi tới Không gian
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("#div1").remove(); }); }); </script> </head> <body> <div id="div1" style="height:100px;width:300px;border:1px Solid black;background-color: yellow;"> Đây là một số văn bản trong div . <p>Đây là một đoạn trong div.</p> <p>Đây là một đoạn khác trong div.</p> </div> <br> <button>Xóa phần tử div</button> </body > </html>