javascript - console.log() method output problem
天蓬老师
天蓬老师 2017-05-16 13:45:20
0
2
682
var op=document.querySelector('p');
        var oP=document.createElement('p');
        console.log(oP);
        oP.innerHTML='hello';
        op.append(oP);

Why is the output here not <p></p>, but <p>hello</p>?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
某草草

This is outputting your nodes. Doesn’t the node include content?

为情所困

This is the behavior of the browser to save computing resources. If the console is not opened during debugging, console.log will print the processed objects. If you open the console to view the output, console.log will print real-time Object.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template