Home > Web Front-end > Layui Tutorial > Comparison of usage differences between different versions of layui

Comparison of usage differences between different versions of layui

王林
Release: 2020-12-02 15:05:34
forward
2690 people have browsed it

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()

});
Copy after login

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template