Javascript 如何使用在其src';s链接?

Javascript 如何使用在其src';s链接?,javascript,cross-domain,postmessage,cross-window-scripting,Javascript,Cross Domain,Postmessage,Cross Window Scripting,我试图从写在其src链接中的脚本中获取iFrame元素的id <div id="div-d"> <iframe id="frame-d" src="script_page.html"></iframe> **<!-- script running inside this iframe's page need to find id of this iframe -

我试图从写在其src链接中的脚本中获取iFrame元素的id

<div id="div-d">
        <iframe id="frame-d" src="script_page.html"></iframe>
        **<!-- script running inside this iframe's page need to find id of this iframe  -->**
 </div>

****