加载页面加上:

1
2
3
layer.config({ 
    extend: 'extend/layer.ext.js'
});

然后后面执行layer.prompt({})即可,案例:

1
2
3
4
5
6
7
8
9
10
11
12
13
function fun(){
        layer.config({
        extend: 'extend/layer.ext.js'
    });
    layer.prompt({
        title: '输入任何口令,并确认',
        formType: 1 //prompt风格,支持0-2
    }, function(pass){
        layer.prompt({title: '随便写点啥,并确认', formType: 2}, function(text){
            layer.msg('演示完毕!您的口令:'+ pass +' 您最后写下了:'+ text);
        });
    });
}

 

相关文章:

  • 2021-06-25
  • 2022-12-23
  • 2021-10-17
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-27
猜你喜欢
  • 2021-08-26
  • 2022-12-23
  • 2021-07-04
  • 2021-07-31
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
相关资源
相似解决方案