<!doctype html>
<html>
<head>
</head>
<body>
<script>
if(window.webkitNotifications){
window.webkitNotifications.requestPermission();
if(window.webkitNotifications.checkPermission()==0){
var obj=window.webkitNotifications.createNotification("1.jpg","标题","内容");
obj.tag="houdun"
obj.show();
obj.οnshοw=function () {
}
obj.οnclick=function () {
alert("我点击了");
}
}
}
</script>
</body>
<head>
</head>
<body>
<script>
if(window.webkitNotifications){
window.webkitNotifications.requestPermission();
if(window.webkitNotifications.checkPermission()==0){
var obj=window.webkitNotifications.createNotification("1.jpg","标题","内容");
obj.tag="houdun"
obj.show();
obj.οnshοw=function () {
}
obj.οnclick=function () {
alert("我点击了");
}
}
}
</script>
</body>
</html>
<!doctype html>
<html>
<head>
</head>
<body>
<script>
window.οnlοad=function () {
var mp3=document.getElementById("mp3");
var time=new Date();
var str="0"+(time.getMonth()+1)+"-0"+time.getDate();07-08
if(localStorage.getItem("time")){
var newstr=localStorage.getItem("time").substr(5)
if(newstr===str){
if(window.webkitNotifications){
window.webkitNotifications.requestPermission();
if(window.webkitNotifications.checkPermission()==0){
var obj=window.webkitNotifications.createNotification("1.jpg","注册时间","恭喜你注册一年了");
obj.show();
obj.οnshοw=function () {
mp3.play();
}
obj.onclose=function () {
mp3.pause()
}
}
}
}
}
var date=document.getElementById("date");
date.οnchange=function () {
localStorage.setItem("time",date.value);
}
}
</script>
<input type="date" name="date" id="date">
<audio src="1.mp3" id="mp3">
</audio>
</body>
<html>
<head>
</head>
<body>
<script>
window.οnlοad=function () {
var mp3=document.getElementById("mp3");
var time=new Date();
var str="0"+(time.getMonth()+1)+"-0"+time.getDate();07-08
if(localStorage.getItem("time")){
var newstr=localStorage.getItem("time").substr(5)
if(newstr===str){
if(window.webkitNotifications){
window.webkitNotifications.requestPermission();
if(window.webkitNotifications.checkPermission()==0){
var obj=window.webkitNotifications.createNotification("1.jpg","注册时间","恭喜你注册一年了");
obj.show();
obj.οnshοw=function () {
mp3.play();
}
obj.onclose=function () {
mp3.pause()
}
}
}
}
}
var date=document.getElementById("date");
date.οnchange=function () {
localStorage.setItem("time",date.value);
}
}
</script>
<input type="date" name="date" id="date">
<audio src="1.mp3" id="mp3">
</audio>
</body>
</html>