jquery html() does not return changed values

前端 未结 4 1151
梦毁少年i
梦毁少年i 2020-12-03 03:20

I have a form with a textbox like this:



    
         


        
4条回答
  •  不思量自难忘°
    2020-12-03 03:45

    $('[type=text], textarea').each(function(){ this.defaultValue = this.value; });
    $('[type=checkbox], [type=radio]').each(function(){ this.defaultChecked = this.checked; });
    $('select option').each(function(){ this.defaultSelected = this.selected; });
    

    then

    $("body").html()
    

提交回复
热议问题