iframe
JavaScript を使用して HTML 要素を作成するベスト プラクティスは何ですか?
var iframe = document.createElement("iframe");
iframe.setAttribute("sandbox", "")
iframe.setAttribute("src", url);
Firefox プラグインの開発中に疑問に直面しましたが、使用法は Web ページの開発とまったく同じです。jQuery は使用しません。
iframe
JavaScript を使用して HTML 要素を作成するベスト プラクティスは何ですか?
var iframe = document.createElement("iframe");
iframe.setAttribute("sandbox", "")
iframe.setAttribute("src", url);
Firefox プラグインの開発中に疑問に直面しましたが、使用法は Web ページの開発とまったく同じです。jQuery は使用しません。
あなたはこのように試すことができます:-
<script type="text/javascript">
function abc() {
iframe = document.createElement("IFRAME");
iframe.setAttribute("src", "http://example.com/");
iframe.style.width = "640px";
iframe.style.height = "480px";
document.body.appendChild(iframe);
}
</script>