Webサイト制作初心者用質問スレ part253
- 498 :Name_Not_Found:2023/06/19(月) 03:14:23.53 ID:???.net
- example.com は、ローカルファイルなのか?
http://〜、https://〜 ではないのか?
.src で、URL を取得できる
<iframe id="ifrm_1" src="example.com"></iframe>
// iframe 要素を取得
const ifrm_1 = document.getElementById( "ifrm_1" );
console.log( ifrm_1.contentWindow.location.href );
//=> about:blank
console.log( ifrm_1.src );
出力
ローカルファイルなら、
file:///C:/Users/〜
VSCode のLive Server なら、
http://127.0.0.1:5500/〜
204 KB
新着レスの表示
掲示板に戻る
全部
前100
次100
最新50
read.cgi ver 2014.07.20.01.SC 2014/07/20 D ★