ifrm.contentWindow.document.getElementById("id")
ContentFrame.document...
换句话说,访问窗口名称。
此外,您的iframe窗口没有任何id值等于"id"的元素。