1.child.html
3.main.html
// iframe的document对象取得
var objHtmlIframe = document.getElementTyId(“iframe”).contentWindow.document;
// keyboard 取得
var keyboard = objHtmlIframe.getElementById(objParent.keyboard_id);
// focusin 的textbox的ClientRect 取得
var objClientRect = event.target.getBoundingClientRect();
// keyboard的位置变更
// 从上到下坐标调整
keyboard.style.top=(document.getElementById(“iframe”).contentWindow.pageYOffset + objClientRect.top + 30) + “px”;
// 从左到右的坐标调整
keyboard.style.left=(document.getElementById(“iframe”).contentWindow.pageXOffset + objClientRect.left - objClientRect.width) + “px”);
}