原html
a.php
";
jquery
$(document).ready(function(){
$(".button").bind({
click:function(){
$.get("./create.php",function(data){
$("body").append(data)
})
}
})
$("input").click(function(){
alert(123456);
})
})
新html
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
题主的问题本质地是如何控制动态插入的新节点。用 jQuery 的话,可以这么来: