Layui tabs embedded in the most secure and effective method of the webpage
Use js method load to embed
- <div class=”layui-tab” lay-filter=”demo”>
- <ul class=”layui-tab-title”>
- <li class = “layui-this”> Site settings </li>
- </ul>
- <div class=”layui-tab-content”>
- <div class=”layui-tab-item layui-show” id=”testID”></div>
- </div>
- </div>
- <script>
- $ (“# testid”). Load (‘”jumping webpage”);
- </script>
The above method is the most effective, the best and the most secure
Then why is it?
How to use <iFarme> </ifarme> to embed some problems such as JS files lost or something
Friendly Tips 1
1. Be sure to pay attention to the problem of variable pollution when using tabs.
Friendly Tips 2
When you want to be a Tabs that can be deleted, but you can use the following code if you want some Tabs not to be deleted
- #hehe i.layui-tab-close{
- display:none!important;
- }
- <ul class=”layui-tab-title”>
- <li lay-id = “1” class = “layui-This” id = ‘hehe’> Home </li>
- <li lay-id=”2″ class=””>XXXX</li>
- </ul>
- Original work here:https://fly.layui.com/jie/15719/