How to access frame (not iframe) contents from jQuery

后端 未结 5 1614
礼貌的吻别
礼貌的吻别 2020-12-09 08:21

I have 2 frames in one page like this (home.html)


        

        
5条回答
  •  感动是毒
    2020-12-09 09:00

    I have nested frames. In my case, to make it work i used command:

    var statusText = 
    top.document.getElementById("treeStatus").contentDocument.getElementById("statusText");
    

    Then, as Charles already answered, you can do anything you want to it through jQuery:

    $(statusText).whatever();
    

提交回复
热议问题