Growl
代码:
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script src="../jquery1.js"></script>
<script src="https://static.runoob.com/assets/jquery/jquery.growl/javascripts/jquery.growl.js
" type="text/javascript"></script>
<link href="https://static.runoob.com/assets/jquery/jquery.growl/stylesheets/jquery.growl.css
" rel="stylesheet" type="text/css" />
</head>
<body>
<button id="btn1">点击1</button>
<button id="btn2">点击2</button>
<button id="btn3">点击3</button>
<button id="btn4">点击4</button>
<script>
$("#btn1").click(
function(){
$.growl({ title: "消息标题", message: "消息内容!" });
}
);
$("#btn2").click(
function(){
$.growl.error({title: "错误标题", message: "错误消息内容!" });
}
);
$("#btn3").click(
function(){
$.growl.notice({title: "提醒标题", message: "提醒消息内容!" });
}
);
$("#btn4").click(
function(){
$.growl.warning({title: "警告标题", message: "警告消息内容!" });
}
);
</script>
</body>
</html>
消息提示;分为4中,普通消息、错误消息、提醒消息、警告消息;默认颜色分别是灰色、红色、绿色、黄色