<body>
<div id="father">
<div id="son">
这是d1
</div>
</div>
<button id="btn" type="button">重新加载</button>
</body>
<script>
$(document).ready(function(e) {
let btn = document.getElementById("btn");
b1.addEventListener("click",function(e){
let father= document.getElementById("father");
let son= document.getElementById("son");
father.appendChild(son);
});
});
</script>
js - 重新加载指定div
于 2022-07-14 11:26:50 首次发布