0
我是appcelerator中的新成員。我想在alert對話框的message屬性中插入html模板。當添加消息作爲一個字符串它工作正常,但我想插入HTML模板。到目前爲止,我嘗試過提到下面這個,但它不工作。在鈦報警對話框的消息屬性中附加html模板
var win1 = Titanium.UI.createWindow({
backgroundColor:'#F00'
});
var mybutton=Ti.UI.createButton
(
{top: 100,title: 'Push Me'}
);
win1.add(mybutton);
var a = Titanium.UI.createAlertDialog({
title:'Alert Test',
message:'Hello World'
});
Ti.API.info('Alert title: ' + a.getTitle() + ' : ' + a.title);
Ti.API.info('Alert message: ' + a.getMessage() + ' : ' + a.message);
mybutton.addEventListener('click', function(e)
{
a.show();
}
);
win1.open();