题图
另外,浏览器控制台和一般嵌入网页的脚本
<script></script>
相比有什么区别?为什么有时候一样的代码表现不一样?
题图
另外,浏览器控制台和一般嵌入网页的脚本
<script></script>
相比有什么区别?为什么有时候一样的代码表现不一样?
$ 等价于 document.querySelector
$$ 等价于 document.querySelectorAll
$(selector [, startNode])
$(selector) returns the reference to the first DOM element with the specified CSS selector. When called with one argument, this function is an alias for the document.querySelector() function.
$$(selector [, startNode])
$$(selector) returns an array of elements that match the given CSS selector. This command is equivalent to calling document.querySelectorAll().
官网来源: