3个简单步骤
对于其他API调用,看到演示。
<link href="toastr.css" rel="stylesheet"/>
<script src="toastr.js"></script>
//显示一个信息没有标题
toastr.info('Are you the 6 fingered man?')其他选项
/显示一个警告,没有标题
toastr.warning('My name is Inigo Montoya. You killed my father, prepare to die!')//显示一个成功,标题
toastr.success('Have fun storming the castle!', 'Miracle Max Says')/显示错误标题
toastr.error('I do not think that word means what you think it means.', 'Inconceivable!')//清除当前的列表
toastr.clear()
这个插件不错
toastr.success('Have fun storming the castle!')
clear_toastr(1600);
// 动态设置消息提示时间
function clear_toastr(time){
setTimeout(
function(){
toastr.clear();
}, time);
}
回复
Uncaught TypeError: Cannot read property 'extend' of undefined,请问一下,报这种错误是因为什么?