var mailname=document.all.Mail_Name.value; //邮件用户名
var xmlUrl = "/" + mailname + ".nsf/iNotes/Mail/?OpenDocument&Form=s_ReadViewEntries&PresetFields=FolderName;($Inbox)&Start=1&Count=-1";
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
var result = 0;
xmlDoc.async = false;
xmlDoc.load(xmlUrl);
var cNodes = xmlDoc.getElementsByTagName("viewentry");
alert("邮件总数 :"+cNodes.length+" 封"); //所有邮件数
for(var j=0;j<cNodes.length;j++)
{
if(xmlDoc.getElementsByTagName("viewentry")[j].getAttribute("unread"))
{result = result + 1;}
}
document.all.Mail_Result.value = result; //未读邮件数
网友评论