var obj = $(top.document.getElementById('mainFrame').contentWindow.document.body).find("#rightFrame").get(0);
The obj above is undefined after logging in, but it has a value after refreshing the browser. Why is this?
淡淡烟草味2017-05-16 13:36:26
Try writing this code in the onload event of the iframe. It may be because the iframe has not been loaded, so the DOM you are looking for cannot be found.