1.
<%
if hasnewcontent then
response.write "<bgsound src='yoursoundfile'>"
end if
%>2.
<script language="javascript">
function quit()
{
event.returnValue="关闭此窗口你将不能及时知道你的状态和收到的信息,确定要关闭吗?";
}
</script>
<body onbeforeunload="quit()" ... >
<%
if hasnewcontent then
response.write "<bgsound src='yoursoundfile'>"
end if
%>2.
<script language="javascript">
function quit()
{
event.returnValue="关闭此窗口你将不能及时知道你的状态和收到的信息,确定要关闭吗?";
}
</script>
<body onbeforeunload="quit()" ... >
<head>
<script language="javascript">
var timerID = null;
var bRefresh = false;
function quit()
{
if (!bRefresh)
event.returnValue="Are you sure you want to close?";
// if (timerID)
//clearTimeout(timerID);
}function refresh()
{
bRefresh = true;
location.reload(true);
}timerID = setTimeout("refresh()",30000,"Javascript");
</script>
</head>
<body onbeforeunload="quit();">
<script language="javascript">
var dt= new Date();
document.write(dt);
</script>
</body>
</html>