layui.config({ base:'../step/step-lay/' }).use([ 'form', 'step'], function () { var $ = layui.$ , form = layui.form , step = layui.step; step.render({ elem: '#stepForm', filter: 'stepForm', '100%', //设置容器宽度 stepWidth: '750px', height: '500px', stepItems: [{ title: '填写入款信息' }, { title: '确认入款信息' }, { title: '完成' }] }); form.on('submit(formStep)', function (data) { step.next('#stepForm'); return false; }); form.on('submit(formStep2)', function (data) { step.next('#stepForm'); return false; }); $('.pre').click(function () { step.pre('#stepForm'); }); $('.next').click(function () { step.next('#stepForm'); }); })