using Javascript to locate an element in an Embedded web page which also in an embedded web pageaccessing a form that is in an iframeWhich “href” value should I use for JavaScript links, “#” or “javascript:void(0)”?Remove empty elements from an array in JavascriptWhich equals operator (== vs ===) should be used in JavaScript comparisons?How do I find out which DOM element has the focus?Deleting array elements in JavaScript - delete vs spliceScroll to the top of the page using JavaScript/jQuery?Get the size of the screen, current web page and browser windowHow to reload a page using JavaScriptHow do I remove a particular element from an array in JavaScript?How can I add new array elements at the beginning of an array in Javascript?

Nautlius: add mouse right-click action to compute MD5 sum

Italian words for tools

Implement the Thanos sorting algorithm

What to do with wrong results in talks?

Why, precisely, is argon used in neutrino experiments?

Is HostGator storing my password in plaintext?

How do I go from 300 unfinished/half written blog posts, to published posts?

Fastening aluminum fascia to wooden subfascia

What does "I’d sit this one out, Cap," imply or mean in the context?

Why Were Madagascar and New Zealand Discovered So Late?

How to write papers efficiently when English isn't my first language?

Integer addition + constant, is it a group?

Avoiding estate tax by giving multiple gifts

How long to clear the 'suck zone' of a turbofan after start is initiated?

Is `x >> pure y` equivalent to `liftM (const y) x`

Failed to fetch jessie backports repository

How does it work when somebody invests in my business?

Does this power sequence converge or diverge? If it converges, what is the limit?

Personal Teleportation as a Weapon

India just shot down a satellite from the ground. At what altitude range is the resulting debris field?

Increase performance creating Mandelbrot set in python

Two monoidal structures and copowering

How easy is it to start Magic from scratch?

Why are there no referendums in the US?



using Javascript to locate an element in an Embedded web page which also in an embedded web page


accessing a form that is in an iframeWhich “href” value should I use for JavaScript links, “#” or “javascript:void(0)”?Remove empty elements from an array in JavascriptWhich equals operator (== vs ===) should be used in JavaScript comparisons?How do I find out which DOM element has the focus?Deleting array elements in JavaScript - delete vs spliceScroll to the top of the page using JavaScript/jQuery?Get the size of the screen, current web page and browser windowHow to reload a page using JavaScriptHow do I remove a particular element from an array in JavaScript?How can I add new array elements at the beginning of an array in Javascript?













-1















I want to write a script to watch online courses automatically using Javascript. But when I want to locate an element in the html page,I find it was in an embedded web page which also in an embedded web page. I have been searching questions in Google and Baidu but I only find the way how to locate an element in an embedded web page. I also ask programmers around me but they also have no idea,oops. the following picture is the position of it("span" is the target).



<html>
<body>
<div class="main">
<iframe id="iframe" src="blala" allowfullscreen="ture" onload="clickImg()">
<html>
<body>
<div class="ans-job-icon">
<iframe src="video/blala" allowfullscreen="ture">
<html>
<body>
<span aria-hidden="true" class="vjs-icon-placeholder"></span>
</body>
</html>
</iframe>
</body>
</html>
</iframe>
</body>
</html>


Can you do me a favor? thx a lot.










share|improve this question







New contributor




Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 1





    If the embedded pages are from different domains then you won't be able to access anything inside them.

    – Sergiu Paraschiv
    Mar 21 at 15:52











  • related stackoverflow.com/questions/478078/…

    – Nino Filiu
    Mar 21 at 15:59















-1















I want to write a script to watch online courses automatically using Javascript. But when I want to locate an element in the html page,I find it was in an embedded web page which also in an embedded web page. I have been searching questions in Google and Baidu but I only find the way how to locate an element in an embedded web page. I also ask programmers around me but they also have no idea,oops. the following picture is the position of it("span" is the target).



<html>
<body>
<div class="main">
<iframe id="iframe" src="blala" allowfullscreen="ture" onload="clickImg()">
<html>
<body>
<div class="ans-job-icon">
<iframe src="video/blala" allowfullscreen="ture">
<html>
<body>
<span aria-hidden="true" class="vjs-icon-placeholder"></span>
</body>
</html>
</iframe>
</body>
</html>
</iframe>
</body>
</html>


Can you do me a favor? thx a lot.










share|improve this question







New contributor




Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 1





    If the embedded pages are from different domains then you won't be able to access anything inside them.

    – Sergiu Paraschiv
    Mar 21 at 15:52











  • related stackoverflow.com/questions/478078/…

    – Nino Filiu
    Mar 21 at 15:59













-1












-1








-1








I want to write a script to watch online courses automatically using Javascript. But when I want to locate an element in the html page,I find it was in an embedded web page which also in an embedded web page. I have been searching questions in Google and Baidu but I only find the way how to locate an element in an embedded web page. I also ask programmers around me but they also have no idea,oops. the following picture is the position of it("span" is the target).



<html>
<body>
<div class="main">
<iframe id="iframe" src="blala" allowfullscreen="ture" onload="clickImg()">
<html>
<body>
<div class="ans-job-icon">
<iframe src="video/blala" allowfullscreen="ture">
<html>
<body>
<span aria-hidden="true" class="vjs-icon-placeholder"></span>
</body>
</html>
</iframe>
</body>
</html>
</iframe>
</body>
</html>


Can you do me a favor? thx a lot.










share|improve this question







New contributor




Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I want to write a script to watch online courses automatically using Javascript. But when I want to locate an element in the html page,I find it was in an embedded web page which also in an embedded web page. I have been searching questions in Google and Baidu but I only find the way how to locate an element in an embedded web page. I also ask programmers around me but they also have no idea,oops. the following picture is the position of it("span" is the target).



<html>
<body>
<div class="main">
<iframe id="iframe" src="blala" allowfullscreen="ture" onload="clickImg()">
<html>
<body>
<div class="ans-job-icon">
<iframe src="video/blala" allowfullscreen="ture">
<html>
<body>
<span aria-hidden="true" class="vjs-icon-placeholder"></span>
</body>
</html>
</iframe>
</body>
</html>
</iframe>
</body>
</html>


Can you do me a favor? thx a lot.







javascript html5






share|improve this question







New contributor




Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Mar 21 at 15:50









Drunk FinnDrunk Finn

1




1




New contributor




Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 1





    If the embedded pages are from different domains then you won't be able to access anything inside them.

    – Sergiu Paraschiv
    Mar 21 at 15:52











  • related stackoverflow.com/questions/478078/…

    – Nino Filiu
    Mar 21 at 15:59












  • 1





    If the embedded pages are from different domains then you won't be able to access anything inside them.

    – Sergiu Paraschiv
    Mar 21 at 15:52











  • related stackoverflow.com/questions/478078/…

    – Nino Filiu
    Mar 21 at 15:59







1




1





If the embedded pages are from different domains then you won't be able to access anything inside them.

– Sergiu Paraschiv
Mar 21 at 15:52





If the embedded pages are from different domains then you won't be able to access anything inside them.

– Sergiu Paraschiv
Mar 21 at 15:52













related stackoverflow.com/questions/478078/…

– Nino Filiu
Mar 21 at 15:59





related stackoverflow.com/questions/478078/…

– Nino Filiu
Mar 21 at 15:59












1 Answer
1






active

oldest

votes


















0














Thank for all of your idea. With your advice, I finally work out this question with my friends. The solution is as
followed.

We find that “window" is one of the object in JavaScript, which can operate the element in "iframe". So you can use it to locate the tag in an embedded web page.




  1. top



    "top" is an attribute in the object window. By using the statement "window.top", you can get the top window in the web page. and then



  2. Using the statement"window.top.iframe" to get the iframe object .


  3. get the next iframe tag by object "document"
    attribute "contentDocument" in iframe can be used to return the current document object. and then you can find the next iframe using the statement"window.top.iframe.contentDocument.getElementsByTagName('iframe')[0]"!






share|improve this answer








New contributor




Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    Drunk Finn is a new contributor. Be nice, and check out our Code of Conduct.









    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55284343%2fusing-javascript-to-locate-an-element-in-an-embedded-web-page-which-also-in-an-e%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Thank for all of your idea. With your advice, I finally work out this question with my friends. The solution is as
    followed.

    We find that “window" is one of the object in JavaScript, which can operate the element in "iframe". So you can use it to locate the tag in an embedded web page.




    1. top



      "top" is an attribute in the object window. By using the statement "window.top", you can get the top window in the web page. and then



    2. Using the statement"window.top.iframe" to get the iframe object .


    3. get the next iframe tag by object "document"
      attribute "contentDocument" in iframe can be used to return the current document object. and then you can find the next iframe using the statement"window.top.iframe.contentDocument.getElementsByTagName('iframe')[0]"!






    share|improve this answer








    New contributor




    Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      0














      Thank for all of your idea. With your advice, I finally work out this question with my friends. The solution is as
      followed.

      We find that “window" is one of the object in JavaScript, which can operate the element in "iframe". So you can use it to locate the tag in an embedded web page.




      1. top



        "top" is an attribute in the object window. By using the statement "window.top", you can get the top window in the web page. and then



      2. Using the statement"window.top.iframe" to get the iframe object .


      3. get the next iframe tag by object "document"
        attribute "contentDocument" in iframe can be used to return the current document object. and then you can find the next iframe using the statement"window.top.iframe.contentDocument.getElementsByTagName('iframe')[0]"!






      share|improve this answer








      New contributor




      Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















        0












        0








        0







        Thank for all of your idea. With your advice, I finally work out this question with my friends. The solution is as
        followed.

        We find that “window" is one of the object in JavaScript, which can operate the element in "iframe". So you can use it to locate the tag in an embedded web page.




        1. top



          "top" is an attribute in the object window. By using the statement "window.top", you can get the top window in the web page. and then



        2. Using the statement"window.top.iframe" to get the iframe object .


        3. get the next iframe tag by object "document"
          attribute "contentDocument" in iframe can be used to return the current document object. and then you can find the next iframe using the statement"window.top.iframe.contentDocument.getElementsByTagName('iframe')[0]"!






        share|improve this answer








        New contributor




        Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        Thank for all of your idea. With your advice, I finally work out this question with my friends. The solution is as
        followed.

        We find that “window" is one of the object in JavaScript, which can operate the element in "iframe". So you can use it to locate the tag in an embedded web page.




        1. top



          "top" is an attribute in the object window. By using the statement "window.top", you can get the top window in the web page. and then



        2. Using the statement"window.top.iframe" to get the iframe object .


        3. get the next iframe tag by object "document"
          attribute "contentDocument" in iframe can be used to return the current document object. and then you can find the next iframe using the statement"window.top.iframe.contentDocument.getElementsByTagName('iframe')[0]"!







        share|improve this answer








        New contributor




        Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 2 days ago









        Drunk FinnDrunk Finn

        1




        1




        New contributor




        Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Drunk Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






















            Drunk Finn is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            Drunk Finn is a new contributor. Be nice, and check out our Code of Conduct.












            Drunk Finn is a new contributor. Be nice, and check out our Code of Conduct.











            Drunk Finn is a new contributor. Be nice, and check out our Code of Conduct.














            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55284343%2fusing-javascript-to-locate-an-element-in-an-embedded-web-page-which-also-in-an-e%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해