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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 17:15:381310browse

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