HTML:css
<div class="content"> <iframe id="frameObj" src="連接" frameborder="0"leftmargin="0" topmargin="0" style="width: 100%;height: 100%;margin-top: 0; display: block;" ></iframe> </div>
js:瀏覽器
var _height = $(window).height(); $(".content").css("height", _height+ "px");
想法:spa
獲取瀏覽器的高度,以後把高度賦值給iframe外面的div,iframe的高度給百分之百code