$(function() {
// window.parent.document.form名.xx.value='xxxxx';
// window可省略。 parent.document.form名.xx.value='xxxxx';
// parent.document.getElementById("xx").value='xxxxx';
console.log(window);//Window → http://localhost:8080/xxx/xxx.html
console.log(parent);//Window → http://localhost:8080/xxx/xxx.html
//console.log(frame);//ReferenceError: frame is not defined
console.log(document);//HTMLDocument → http://localhost:8080/xxx/xxx.html
//console.log(form);//ReferenceError: form is not defined
// window.parent.document.form名.xx.value='xxxxx';
// window可省略。 parent.document.form名.xx.value='xxxxx';
// parent.document.getElementById("xx").value='xxxxx';
console.log(window);//Window → http://localhost:8080/xxx/xxx.html
console.log(parent);//Window → http://localhost:8080/xxx/xxx.html
//console.log(frame);//ReferenceError: frame is not defined
console.log(document);//HTMLDocument → http://localhost:8080/xxx/xxx.html
//console.log(form);//ReferenceError: form is not defined
});
Window对象、Parent对象、Frame对象、Document对象和Form对象的阶层关系:Windows对象→Parent对象→Frame对象→Document对象→Form对象,
http://blog.csdn.net/wang725/article/details/17094189