实现iFrame自适应高度,原来很简单!

    技术2022-05-11  38

    < iframe  id ="iFrame1"  name ="iFrame1"  width ="100%"  onload ="this.height=iFrame1.document.body.scrollHeight"  frameborder ="0"  src ="index.htm" ></ iframe > 看到了吧,关键就在于οnlοad="this.height=iFrame1.document.body.scrollHeight"!  

    最新回复(0)