【发布时间】:2017-06-30 20:52:13
【问题描述】:
我有以下代码...用于甜蜜警报文本框
swal({
title: 'Select an Item',
input: 'select',
inputOptions: listOfItemsForSelectBox,
inputPlaceholder: 'Select country',
showCancelButton: true,
inputValidator: function (value) {
return new Promise(function (resolve, reject) {
if (value != null) {
resolve()
}
})
}
}).then(function (result) {
swal({
type: 'success',
html: 'You selected: ' + result
})
})
由于某种原因,它只是在“您选择”部分返回“true”...
我想获取商品的 id。
【问题讨论】:
标签: javascript sweetalert sweetalert2