layui表單提交

2021-10-04 12:25:14 字數 3251 閱讀 3249

<

form

method

="post"

>

<

div

class

="layui-form-item"

>

<

label

for="l_email"

class

="layui-form-label"

>郵箱

label

>

<

div

class

="layui-input-inline"

>

<

input

type

="text"

id="l_email"

name

="email"

lay-verify

="required|email"

autocomplete

="off"

class

="layui-input"

placeholder

="請輸入郵箱"

/>

div>

div>

<

div

class

="layui-form-item"

>

<

label

for="l_pass"

class

="layui-form-label"

>密碼

label

>

<

div

class

="layui-input-inline"

>

<

input

type

="password"

id="l_pass"

name

="pass"

lay-verify

="required"

autocomplete

="off"

class

="layui-input"

placeholder

="請輸入密碼"

minlength

="6"

maxlength

="20"

/>

div>

div>

<

div

class

="layui-form-item"

>

<

label

for="l_vercode"

class

="layui-form-label"

>驗證碼

label

>

<

div

class

="layui-input-inline"

>

<

input

type

="text"

id="l_vercode"

name

="vercode"

lay-verify

="required"

placeholder

="請輸入後面顯示的字元"

autocomplete

="off"

class

="layui-input"

minlength

="4"

maxlength

="4"

/>

div>

<

div

class

="layui-input-inline"

>

<

span

style

="color: #c00;"

><

img

src="/ajax/codeimage"

class

="fly-imagecode"

id="vcodeimg"

>

span

>

div>

div>

<

div

class

="layui-form-item"

>

<

button

class

="layui-btn"

lay-filter

="btnsignin"

lay-submit

>立即登入

button

>

<

span

style

="padding-left:20px;"

>

<

a href

="forget.html"

>忘記密碼?

a>

span

>

div>

<

div

class

>

<

span

>或者使用社交賬號登入

span

>

<

a href

=""onclick

="layer.msg('正在通過qq登入', )"

class

="iconfont icon-qq"

title

="qq登入"

>

a>

<

a href

=""onclick

="layer.msg('正在通過微博登入', )"

class

="iconfont icon-weibo"

title

="微博登入"

>

a>

div>

form

>

layui.use(['form', 'layedit', 'laydate'], function

() );

form.on('submit(btnsignin)', function

(data)

var url = '/ajax';

$.get(url, data.field,

function

(json)

else

}, 'json')

return

false

; });

});

layui表單提交到後台

思路 我在開發問卷調查模組時,想新增問卷的時候使用layui彈出乙個表單,然後經過校驗提交到ssm下的controller裡 一 jsp要彈出的表單 add class layui btn layui btn sm 新增問卷提交 二 layui指令碼 layui.use layer form fun...

layui外掛程式表單驗證提交觸發提交

form class layui form action method post div class logi content p class tit 管理系統 div class layui form item label class layui form label 賬號 div class l...

槽糕,layui表單提交倆次

槽糕layui表單會提交倆次,你遇到過嗎?使用這個layui已經快倆年時間了,剛剛新搭xadmin的框架,於是就出現了表單會重複提交這個問題,很懊惱啊!如果你想直接知道解決方案,那就直接到第三小節即可。首先來看看咔咔都做了什麼操作。使用的xadmin模板,估計是沒有把js檔案引全面造成的問題。咔咔想...