<a name="alert"></a>
## alert(content, [yes], [options])
alert 警告彈框,功能類似于瀏覽器自帶的 alert 彈框,用于提醒、警告用戶簡單扼要的信息,只有一個“確認”按鈕,點擊“確認”按鈕后關閉彈框。
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| content | <code>string</code> | 彈窗內容 |
| [yes] | <code>function</code> | 點擊確定按鈕的回調 |
| [options] | <code>object</code> | 配置項 |
| [options.title] | <code>string</code> | 彈窗的標題 |
| [options.className] | <code>string</code> | 自定義類名 |
| [options.buttons] | <code>array</code> | 按鈕配置項,詳情參考dialog |
**Example**
```js
weui.alert('普通的alert');
weui.alert('帶回調的alert', function(){ console.log('ok') });
var alertDom = weui.alert('手動關閉的alert', function(){
return false; // 不關閉彈窗,可用alertDom.hide()來手動關閉
});
weui.alert('自定義標題的alert', { title: '自定義標題' });
weui.alert('帶回調的自定義標題的alert', function(){
console.log('ok')
}, {
title: '自定義標題'
});
weui.alert('自定義按鈕的alert', {
title: '自定義按鈕的alert',
buttons: [{
label: 'OK',
type: 'primary',
onClick: function(){ console.log('ok') }
}]
});
// 多次使用
var alert = weui.alert('hello');
alert.hide(function(){
weui.alert('world');
});
```