jquery-weui两个输入框

来源:互联网 发布:卓越精算软件使用方法 编辑:程序博客网 时间:2024/05/18 00:47
/** * Created by wxf on 2017/3/15. */$(document).ready(function () {});//<button onclick="alertTwoInput('测试描述','标题','请输入name','请输入pass','取消','确定');">测试</button>function alertTwoInput(text, title, input1, input2, onCancel, onOK) {    var config;    if (typeof text === 'object') {        config = text;    } else {        config = {            text: text,            title: title,            input1: input1,            input2: input2,            onOK: onOK,            onCancel: onCancel,            empty: false  //allow empty        };    }    $.modal({        text: '<p class="weui-prompt-text">' + (config.text || '') + '</p><input type="text" class="weui-input weui-prompt-input" id="weui-prompt-input" value="' + (config.input1 || '') + '" />' + '<input type="text" class="weui-input weui-prompt-input" id="weui-prompt-input" value="' + (config.input2 || '') + '" />',        title: title,        buttons: [{            text: onCancel,            className: "primary",            onClick: function () {                console.log("cancel");                $.closeModal();            }        }            , {                text: onOK,                className: "primary",                onClick: function () {                    console.log("ok");                }            }        ]    });}
0 0