Last active
February 20, 2017 05:57
-
-
Save nntsugu/8bef116602d60c8ca09013bc8671ce81 to your computer and use it in GitHub Desktop.
Javascriptでのiframe操作tips(iframeの中身を差し替える) ref: http://qiita.com/nntsugu/items/640762a7ba8fd7cc50dd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('iframe_id')[0].contentDocument.location.replace('target_url or target_path'); | |
↓ | |
document.getElementById('iframe_id').contentWindow.location.replace('target_url or target_path'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('iframe_id')[0].contentDocument.location.replace('target_url or target_path'); | |
↓ | |
document.getElementById('iframe_id').contentWindow.location.replace('target_url or target_path'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#iframe_id')[0].contentDocument.location.reload(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('iframe_id')[0].contentDocument.location.reload(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#iframe_id')[0].contentDocument.location.replace('target_url or target_path'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('iframe_id')[0].contentDocument.location.replace('target_url or target_path'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#iframe_id')[0].contentDocument.location.replace('/preview/show/20140320'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment