html方法和text方法
//html:innerHTML text:innerText console.log($("div").html());//<h3>我是標題</h3> console.log($("div").text());//我是標題

$("div").text("<p>我是文本</p>");

$("div").html("<p>我是文本</p>");

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/14838.html
標籤:jQuery
上一篇:jQuery---內容復習
