Dynamically modified value of input not reflected in DOM

前端 未结 3 951
囚心锁ツ
囚心锁ツ 2020-12-20 18:46

How can I get the DOM to reflect the modified input value?

3条回答
  •  猫巷女王i
    2020-12-20 19:29

    I'm sorry, but the problem is not in the example code you supplied. Or when this is the only html in your page, then you're missing the starting and closing tags.

    This clean page runs perfectly on my machine:

    
    
        
        
            

    Or are you testing in Internet Explorer? In that case, remove the line which is logging to your error console:

    console.log('div.html(): ', $('div').html())
    

提交回复
热议问题