我如何实现以下目标:
document.all.regTitle.innerHTML = 'Hello World';
使用jQuery regTitle
我的div ID 在哪里?
如何使用jQuery替换div的innerHTML?
我如何实现以下目标:
document.all.regTitle.innerHTML = 'Hello World';
使用jQuery regTitle
我的div ID 在哪里?
第1644篇《如何使用jQuery替换div的innerHTML?》来自Winter(https://github.com/aiyld/aiyld.github.io)的站点
you can use either html or text function in jquery to achieve it
$("#regTitle").html("hello world");
OR
$("#regTitle").text("hello world");
$("#regTitle").html("Hello World");
相似问题
问题类别
jQuery has few functions which work with text, if you use
text()
one, it will do the job for you:Also, you can use
html()
instead, if you have any html tag...