How can I get an element from within a frameset frame using JavaScript?

前端 未结 3 2049
慢半拍i
慢半拍i 2020-12-09 03:12

I need to access and element from within a frameset frame. For example if I have the following markup:


  

        
3条回答
  •  醉话见心
    2020-12-09 03:43

    You need to get the Document object for the frame.

    window.frames[1].document.getElementById('someElementId')
    

提交回复
热议问题