更改 div 中的内容的最佳选择是什么?
What's the best option for changing content inside a div?
我想知道更改 div 中内容的最佳选择。
使用JavaScript
document.getElementById("yourDivId").innerHTML="your content";
或使用jquery
$("#yourDivId").text("your content");
我想知道更改 div 中内容的最佳选择。
使用JavaScript
document.getElementById("yourDivId").innerHTML="your content";
或使用jquery
$("#yourDivId").text("your content");