-1
当我点击#demo_3时,它只是消除了按钮。不过,如果在replaceWith()
里面我放了一个<p> O, hai! </p>
,哦,海!会出现。jquery replacewith函数:不能替换<form>
$(document).ready(function(){
$("#demo_3").click(function(){
$("#ind_3").replaceWith('<form action="newgoal.php" method="post"><input name="newgoal" type="text"></form>');
});
});
不知道你为什么这样做,但似乎工作正常http://jsfiddle.net/t2uxZ/ –