At present, there are three main ways to sneak into external web pages:
iframe method
<div><iframe src=""></iframe>
ajax way
<div id=“externalHtml"></div>
After ajax loads the data, just assign it directly.
script script method
<div><script src="" type="text/javascript"></script></div>
Example of the first method
<div class="layui-tab" lay-filter="demo" lay-data="{ height:332}"> <ul class="layui-tab-title"> <li class="layui-this">hao123</li> <li>Baidu</li> <li>layuiofbutton</li> </ul> <div class="layui-tab-content"> <div class="layui-tab-item layui-show"> <iframe src="http://"></iframe> </div> <div class="layui-tab-item" > <iframe src=""></iframe> </div> <div class="layui-tab-item"> <button class="layui-btn layui-btn-normal">All-match buttons</button> </div> </div> </div>
The above method to load external html pages in the layui tab control is all the content I share with you. I hope you can give you a reference and I hope you support me more.