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?
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
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.
add a comment |
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
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
add a comment |
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
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
javascript html5
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.
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
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
Using the statement"window.top.iframe" to get the iframe object .
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]"!
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.
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
Using the statement"window.top.iframe" to get the iframe object .
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]"!
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.
add a comment |
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.
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
Using the statement"window.top.iframe" to get the iframe object .
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]"!
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.
add a comment |
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.
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
Using the statement"window.top.iframe" to get the iframe object .
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]"!
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.
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
Using the statement"window.top.iframe" to get the iframe object .
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]"!
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.
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.
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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