<!DOCTYPE html>
<html>
<head>
<title>桌面通知demo</title>
</head>
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/desktopnotify.js"></script>
<body>
<h1>demo</h1>
<button>点击</button>
</body>
<script type="text/javascript">
/* ------------------------------------------
Shows the notification (if possible)
message = {
icon:
title:
message:
onshow:
onclick:
onerror:
onclose:
}
------------------------------------------ */
$(function(){
$("button").click(function(){
Notify.show({
icon:"images/icon.png",
title:'hello world!',
message:"Talk is cheap. Show me the code!"
});
});
})
</script>
</html>