<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script>
<div id="divTest1"></div>
<script type="text/javascript">
$("#divTest1").text("Hello, world!").css("color", "blue");
console.log($("#divTest1").text("Hello, world!"));
</script>
在鍍鉻>控制檯的.text(),它顯示:[div#divTest1, context: document, selector: "#divTest1", jquery: "1.10.1", constructor: function, init: function…]
一些問題jQuery的
這裏(http://api.jquery.com/text/)這是說:.text() method returns the value of text and CDATA nodes as well as element nodes.
問題:
如何在控制檯中查找文本的te值?
CDATA節點和元素節點有什麼區別?