通过nativeJS调用原生弹出提示,
// 创建UIAlertView类的实例对象
var view = new UIAlertView();
// 设置提示对话上的内容
view.initWithTitlemessagedelegatecancelButtonTitleotherButtonTitles(title // 提示框标题
, texts // 提示框上显示的内容
, null // 操作提示框后的通知代理对象,暂不设置
, btnlable // 提示框上取消按钮的文字
, null ); // 提示框上其它按钮的文字,设置为null表示不显示
// 调用show方法显示提示对话框
view.show();
当有多个弹出提示按钮的时候,能不能监听点击哪个按钮触发的事件?
1 个回复
DCloud_heavensoft
复杂了,用plus.nativeUI.confirm,看www.html5plus.org/#specification#/specification/nativeUI.html