javascript - Does html() really replace html code? -
i have html code this,
<form action="abc.html" method="post"> <div id = "result"> <input type="hidden" value="1" name="banner"> </div> </form>
then jquery code replace content in div,
var temp = "<input type='hidden' value='1' name='banner'>" $(".result").html(temp);
then submit form , find there 2 values in form.banner, form.banner=1,1
do wrong? or have use clear data first use html()? lot!
replace .result #result. you're trying target class, div contains id.
Comments
Post a Comment