<iframe>
標(biāo)簽,其中src屬性指定要嵌入的頁面地址。<iframe src="http://www.example.com"></iframe>
var iframe = document.createElement('iframe');
iframe.src = 'http://www.example.com';
document.body.appendChild(iframe);
$()
函數(shù)創(chuàng)建iframe元素,設(shè)置其src屬性,并插入到頁面中。$('<iframe>', {
src: 'http://www.example.com'
}).appendTo('body');
ng-include
指令,將要嵌入的頁面地址作為參數(shù)傳入。<div ng-include="'http://www.example.com'"></div>
<iframe>
組件,設(shè)置其src屬性。<iframe src="http://www.example.com"></iframe>