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