search
HomeWeb Front-endLayui TutorialComparison of usage differences between different versions of layui

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!

Statement
This article is reproduced at:csdn. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools