 |
สอบถามเรื่อการทำระบบ Notify Alert ข้อความใหม่ หรือ Notification แบบ Outlook (PHP,MySQL) |
|
 |
|
|
 |
 |
|
ลองเล่นตัวนี้ดูครับ ใช้ง่ายมาก ตอบโจทย์
http://lobianijs.com/site/lobibox
|
 |
 |
 |
 |
Date :
2016-03-23 23:50:06 |
By :
meannerss |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ในรุ่นใหม่ ๆ น่าจะใช้ไม่ได้แล้วครับ 
|
 |
 |
 |
 |
Date :
2016-03-24 09:36:57 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองใช้อันนี้ดูครับ ผมใช้ได้ปกติดีครับ
chrome firefox
Code (PHP)
notify('http://cdn.sstatic.net/stackexchange/img/logos/so/so-icon.png','หัวข้อ','รายละเอียด');
function notify(icon,title,body) {
if (!("Notification" in window)) {
alert("This browser does not support desktop notification");
}else if (Notification.permission === "granted") {
var notification = new Notification(title,{
icon: icon,
body: body
});
var i=1;
setTimeout(function () {
notification.close();
}, '10000');
notification.onclick = function () {
notification.close();
}
}else if (Notification.permission !== 'denied') {
Notification.requestPermission(function (permission) {
if(!('permission' in Notification)) {
Notification.permission = permission;
}
if (permission === "granted") {
var notification = new Notification("Hi there!");
}
});
}
}
|
 |
 |
 |
 |
Date :
2016-03-24 11:17:34 |
By :
armdbz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เอาแบบง่ายๆ โมเองเลยครับ
Code (JavaScript)
<div id="MyNotify" style="position: fixed; width: 200px; height: 100px; bottom: 1px; right: 1px; border: 2px solid red; display: none;">
<table style="width: 100%; height:100%"><tr><td valign=middle align=center >TEST ALERT</td></tr></table>
</div>
<button>Show Test</button>
<script src="jquery.js"></script>
<script>
$('button').click(function(){
var isShow = $(this).html()=='Show Test';
$(this).html( isShow ? 'Hide Test' : 'Show Test');
$('#MyNotify').css('display', isShow? 'block' : 'none');
});
</script>
|
 |
 |
 |
 |
Date :
2016-03-24 12:03:33 |
By :
Chaidhanan |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|