javascript - ifrmae framework refresh problem
迷茫
迷茫 2017-05-16 13:34:26
0
1
454

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?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
淡淡烟草味

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template