jQuery: Access frame in nested frameset

前端 未结 3 1629
说谎
说谎 2020-12-15 09:33

I have a document which has a nested frameset. I need to access one of the nested frames, named \"sq_main\", and access content inside this frame. Here is my structure:

3条回答
  •  自闭症患者
    2020-12-15 09:43

    Try to navigate one step at a time. IIRC, the frames array only works with iframes. Try the selector frame[name = 'sq_main'] instead.

    Example by Ronny Sherer:

    var frameDocument = $('frame[name="mainFrame"]', top.document)[0].contentDocument;
    $(frameDocument).find('body').prepend('

    TEST!!!!

    ');

提交回复
热议问题