Reposted from https://www.cnblogs.com/puke/archive/2012/09/13/2683067.html
Have tried this method
The code is as follows:
$(‘#objId’, parent.document);
This way you can get the elements of the parent page , But when calling the method of EasyUI, an error will be reported.
I was depressed for a long time, and finally found the plan, the difference in writing is as follows:
< p>In this way, no error will be reported when calling the method
Such as:
title : title,
content: content,
closable: true
});
Please see the picture below, this is the effect
Click the add button to open the add page
< p>
Get parent page elements in iframe child page
The code is as follows:
$(‘#objId’, parent.document);
parent.$(‘#objId ‘)
title: title,
content: content,
closable: true
});
parent.$(‘#objId’).tabs(“add”, {