document.frames('reportFrame').document
不是很了解,有两个document,其中document.frames('reportFrame')指的是你当前文档中一个name属性为'reportFrame'的frame的window对象(不是DOM对象),而后接一个".document"就取得了DOM对象,这个DOM对象就是你要查找frame中ID为reportFrameForm的DOM对象的context
$("#reportFrameForm",document.frames('reportFrame').document)
先解释document.frames('reportFrame').document
这句是原生态的javascript意思是.获取当前文档(document)里框架集(frames)里id/name为reportFrame的文档(最后的那个document)
jQuery语法:$(选择器,[待查文档])
若是没有指定[待查文档]就是$(选择器)这样,指从当前文档查询.若是指定了[待查文档]就从指定的待查文档里查询选择器.
$("#reportFrameForm"
的意思就是"找到id为reportFrameForm的DOM元素
$("#reportFrameForm",document.frames('reportFrame').document)
整句的意思就是:
从当前页面的名字为reportFrame的框架页面里找到id为reportFrameForm的元素.
----------------
大体能够猜出这句是操做嵌入页里的一个叫reportFrameForm的表单 javascript
document.frames()与document.frames[]的区别 html
-______________________________________________ java