safari iframe 宽度不受控制解决

var u = navigator.userAgent, app = navigator.appVersion;
var v = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 ? 'scrolling="auto"' :'scrolling="no"';
document.write('<iframe src="http://m.021.com?mid=yumi"  id="iframe" ' + v + ' style="width: ' + document.body.clientWidth + 'px !important;" frameborder="0" allowtransparency="true"> </iframe>');

 

posted @ 2016-07-20 17:20  大赚佬  阅读(548)  评论(0编辑  收藏  举报