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

May 16, 2016 pm 05:15 PM
iframe

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
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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How do I crop an IFrame in HTML? How do I crop an IFrame in HTML? Aug 29, 2023 pm 04:33 PM

How do I crop an IFrame in HTML?

What does data-id in iframe mean? What does data-id in iframe mean? Aug 28, 2023 pm 02:25 PM

What does data-id in iframe mean?

Why does iframe load slowly? Why does iframe load slowly? Aug 24, 2023 pm 05:51 PM

Why does iframe load slowly?

What technology can replace iframe What technology can replace iframe Aug 24, 2023 pm 01:53 PM

What technology can replace iframe

Microsoft: Outlook error downloads 'TokenFactoryIframe' file on every visit Microsoft: Outlook error downloads 'TokenFactoryIframe' file on every visit Apr 19, 2023 am 08:25 AM

Microsoft: Outlook error downloads 'TokenFactoryIframe' file on every visit

What are the loading events of iframe? What are the loading events of iframe? Aug 28, 2023 pm 01:55 PM

What are the loading events of iframe?

What's the danger in iframes What's the danger in iframes Sep 08, 2023 pm 03:14 PM

What's the danger in iframes

What does iframe mean in Python? What does iframe mean in Python? Aug 25, 2023 pm 03:24 PM

What does iframe mean in Python?

See all articles