为什么我不能在下面的例子中使$(frame)成为jQuery对象? 以下是我的chrome开发人员工具的输出。
console: mainFrame
output: <frame src="http://someurl.com" name="mainFrame">
console: $(mainFrame).contents()
output: SyntaxError: Failed to execute 'querySelector' on 'Document': '[object HTMLFrameElement]' is not a valid selector.
编辑:
回应评论......
$.toString()
"function $(selector, [startNode]) { [Command Line API] }"
typeof(mainFrame)
"object"
jQuery
ReferenceError: jQuery is not defined