Home >Web Front-end >Layui Tutorial >Comparison of usage differences between different versions of layui
Comparison of usage differences between different versions of layui
(Related recommendations: layui)
1. Obtain the Form module Interface, changed from the previous var form = layui.form() to: var form = layui.form
2. Get the Element module interface, changed from the previous var element = layui.element() to: var element = layui.element
The example is as follows:
//2以上版本: layui.use(['layer', 'form', 'element'], function(){ var layer = layui.layer ,form = layui.form ,element = layui.element }); //1.x版本: layui.use(['layer', 'form', 'element'], function(){ var layer = layui.layer ,form = layui.form() ,element = layui.element() });
The above is the detailed content of Comparison of usage differences between different versions of layui. For more information, please follow other related articles on the PHP Chinese website!