When I was working on a program recently, the client requested that a voice message be played as a reminder when there is new information. Based on the situation, the summary is as follows:
1. Create a new field in the information table and use the method of 0 and 1 to determine the status of the information.
2. Create a new page, refresh it regularly, and query whether there are records with a field value of 0 in the table.
3. When the administrator clicks to view the information, change the field value to 1.
The most critical one is step 2. The required code is given below
Refresh the specified page regularly. For example, the new page is called a.asp
Then it is <script>setTimeout(location.href=a.asp',10000)</script>
Database connection.
<%set rs = conn.execute(select * from [table name] where field name = 0 )
if not rs.eof then%>
<bgsound src=audio path loop=false>
<%end if
rs.close:set rs = nothing%>