本文翻译自:How to replace innerHTML of a div using jQuery?
How could I achieve the following: 我怎样才能实现以下目标:
document.all.regTitle.innerHTML = 'Hello World';
Using jQuery where regTitle
is my div ID? 使用jQuery,其中regTitle
是我的div ID?
#1楼
参考:https://stackoom.com/question/5UeC/如何使用jQuery替换div的innerHTML
#2楼
$("#regTitle").html("Hello World");
#3楼
The html() function can take strings of HTML, and will effectively modify the <