jQuery---html方法和text方法
时间:2020-01-19 16:31:34
收藏:0
阅读:338
html方法和text方法
//html:innerHTML text:innerText console.log($("div").html());//<h3>我是标题</h3> console.log($("div").text());//我是标题
$("div").text("<p>我是文本</p>");
$("div").html("<p>我是文本</p>");
评论(0)