之後是寫script了
<script type=
var numberOfEmails_original=
var app = Sys
app
function applicationInitHandler(sender
InboxService
}
首先
function OnCurrentNumberOfEmailsReady(result
numberOfEmails_original= result;
// Start Checking
StartChecking();
}
OnCurrentNumberOfEmailsReady方法將WEBSERVICE調用的結果(當前狀態下有多少封信RESULT)返回給變量
function StartChecking() {
InboxService
}
startchecking方法
function OnLastestNumberOfEmailsReady(result
var numberOfEmails_new= result;
if (numberOfEmails_new > numberOfEmails_original) {
ShowPopup();
$get(
// Update the count here
numberOfEmails_original= numberOfEmails_new;
}
// Start checking again
window
}
這個方法
然後再用setimeout來設置每隔
function ShowPopup() {
$get(
$get(
}
function HidePopup() {
$get(
$get(
}
</script>
[
From:http://tw.wingwit.com/Article/program/net/201311/15316.html