ASP implements the effect of playing voice prompts when new information is available

Source: Internet
Author: User

1. Create a new field in the information table and use the methods 0 and 1 to determine the information status.
2. Create a new page, regularly refresh the page, and check whether there are records with a field value of 0 in the table.
3. When the Administrator clicks to view the information, the field value is changed to 1.
The most important part is step 1.Code
Regularly refresh the specified page. For example, the newly created page is called a. asp.
<SCRIPT> setTimeout ("location. href =" A. asp ", 10000) </SCRIPT>
Database connection.
<% Set rs = conn.exe cute ("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 %>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.