jQuery入門–remove()の使い方
コード下記
<!DOCTYPE html>
<html>
<head>
<script src="http://xxx/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$(“button").click(function(){
$(“#div_remove").remove();
});
});
</script>
</head>
<body>
<div id="div_remove" style="height:50px;width:260px;border:1px solid black;background-color:yellow;">
This is some text in the div.
<p>This is a paragraph in the div.</p>
<p>This is another paragraph in the div.</p>
</div>
<br>
<button>Remove div element</button>
</body>
</html>