Home > Web Front-end > JS Tutorial > js method to get the current URL of IFRAME_javascript skills

js method to get the current URL of IFRAME_javascript skills

WBOY
Release: 2016-05-16 17:15:38
Original
1304 people have browsed it

Many times when we use iframes, we will do paging operations. The url jump inside the iframe cannot be obtained directly through the src attribute of the iframe.

How to get the current url of the iframe

Copy code The code is as follows:

parent.document.getElementById("content_info").contentWindow.location.href

Where: content_info is the id of the iframe
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template