function ShConfirm() {
shconfirm("确定要这么做吗!", function (result) {
if (result) {
alert("点击了确定");
} else {
alert("点击了取消");
}
});
}
function ShPrompt() {
shprompt("请问1+1等于几!", function (text) {
alert("用户输入了:" + text);
}, /^\d{1,}$/, "请输入数字!");
}
shalert 就直接用就行了。和 js的alert 效果一样。
复制代码 代码如下: