jqMobi 中弹出框的使用
作者:本站编辑 发布时间:2015-11-24 来源:本站原创
点击数:
1,引入js
2.写对应的方法
<script>
function showPopup1() {
$("#afui").popup("I'm replacing an alert box");
}
function showPopup2() {
$("#afui").popup({
title: "Alert! Alert!",
message: "This is a test of the emergency alert system!! Don't PANIC!",
cancelText: "Cancel me",
cancelCallback: function () {
console.log("cancelled");
},
doneText: "I'm done!",
doneCallback: function () {
console.log("Done for!");
},
cancelOnly: false
});
}
function showPopup3() {
$("#afui").popup({
title: "Login",
message: "Username: <input type='text' class='af-ui-forms'><br>Password: <input type='text' class='af-ui-forms' style='webkit-text-security:disc'>",
cancelText: "Cancel",
cancelCallback: function () {},
doneText: "Login",
doneCallback: function () {
alert("Logging in")
},
cancelOnly: false
});
}