Javascript get element in iframe

https://stackoverflow.com/questions/1088544/get-element-from-within-an-iframe

var iframe = document.getElementById('iframeId');
var innerDoc = iframe.contentDocument || iframe.contentWindow.document;

IMPORTANT: Make sure that the iframe is on the same domain, otherwise you can't get access to its internals. That would be cross-site scripting.

留言

這個網誌中的熱門文章

OBS 抓不到畫面, 視窗, 遊戲擷取, 黑或白畫面, 當掉 ,卡住, black/white screen, window game capture, crash, freeze

優化實況(一) OBS設定 streaming settings

OBS plugin obs-text 顯示播放中音樂, display playing music