js获取p标签内容
$("p[name='msg']").text()
$("p[name='msg']").html()
两者之间的区别,前者获取p标签中的内容,后者获取p标签中的html
区别就是html()会保留html,text()只有文本内容
js获取p标签内容
$("p[name='msg']").text()
$("p[name='msg']").html()
两者之间的区别,前者获取p标签中的内容,后者获取p标签中的html
区别就是html()会保留html,text()只有文本内容