


Ajax+php creates progress bar readyState in various states_PHP tutorial
Using Ajax+php to create a progress bar is actually very simple.
readyState == status (0,1,2,3,4)
0: The request has not been initialized, open has not been called yet
1: The request has been established, but has not been sent, and send has not been called yet
2: The request has been sent and is being processed
3: The request is being processed, usually there is already some data in the response that can be called
4: Completed
var xmlHttp;
function create()
if(window.ActiveXObject)
{
xmlHttp = new ActiveXObject("Microsoft .XMLHTTP");//IE browser
}
else if(window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();//Non-IE browser
}
}
function Request(url)
{
xmlHttp.open("GET","for.php?id="+url,true);//true is asynchronous transmission
xmlHttp. onreadystatechange = ip985;//Response function
xmlHttp.send(null);
}
function ip985()
{
if(xmlHttp.readyState==1)
{
document.getElementById('IP985').innerHTML = "The request has been established and is ready to be sent..."; //IP985 flag
}
if(xmlHttp.readyState==4)
{
var v = xmlHttp.responseText;//Get content
document.getElementById('ip985').innerHTML = v;//Target web page content
}
}

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The hard disk serial number is an important identifier of the hard disk and is usually used to uniquely identify the hard disk and identify the hardware. In some cases, we may need to query the hard drive serial number, such as when installing an operating system, finding the correct device driver, or performing hard drive repairs. This article will introduce some simple methods to help you check the hard drive serial number. Method 1: Use Windows Command Prompt to open the command prompt. In Windows system, press Win+R keys, enter "cmd" and press Enter key to open the command

"The connection status in the event log message shows Standby: Disconnected due to NIC compliance. This means that the system is in standby mode and the network interface card (NIC) has been disconnected. Although this is usually a network issue , but can also be caused by software and hardware conflicts. In the following discussion, we will explore how to solve this problem." What is the reason for standby connection disconnection? NIC compliance? If you see the "ConnectivityStatusinStandby:DisConnected,Reason:NICCompliance" message in Windows Event Viewer, this indicates that there may be a problem with your NIC or network interface controller. This situation is usually

Momo, a well-known social platform, provides users with a wealth of functional services for their daily social interactions. On Momo, users can easily share their life status, make friends, chat, etc. Among them, the setting status function allows users to show their current mood and status to others, thereby attracting more people's attention and communication. So how to set your own Momo status? The following will give you a detailed introduction! How to set status on Momo? 1. Open Momo, click More in the lower right corner, find and click Daily Status. 2. Select the status. 3. The setting status will be displayed.

Methods to view server status include command line tools, graphical interface tools, monitoring tools, log files, and remote management tools. Detailed introduction: 1. Use command line tools. On Linux or Unix servers, you can use command line tools to view the status of the server; 2. Use graphical interface tools. For server operating systems with graphical interfaces, you can use the graphics provided by the system. Use interface tools to view server status; 3. Use monitoring tools. You can use special monitoring tools to monitor server status in real time, etc.

Want to appear "offline" or don't want to share your current status with your friends on WhatsApp? There is a simple but clever trick to do this. You can adjust your WhatsApp settings so that your current status (offline or last seen) is not visible to your friends or others there. How to show offline status on your WhatsApp status bar? This is a very simple and streamlined process. So, follow the steps below now. Step 1 – Open WhatsApp on your phone. Step 2 – Tap ⋮ and choose to open Settings. Step 3 – Open Privacy settings to access it. Step 4 – On that privacy page, open the “Last Viewed & Online” setting to access it. Step 5 – Change the “Who can

How to write a simple online reservation system through PHP. With the popularity of the Internet and users' pursuit of convenience, online reservation systems are becoming more and more popular. Whether it is a restaurant, hospital, beauty salon or other service industry, a simple online reservation system can improve efficiency and provide users with a better service experience. This article will introduce how to use PHP to write a simple online reservation system and provide specific code examples. Create database and tables First, we need to create a database to store reservation information. In MyS

How to write a simple student performance report generator using Java? Student Performance Report Generator is a tool that helps teachers or educators quickly generate student performance reports. This article will introduce how to use Java to write a simple student performance report generator. First, we need to define the student object and student grade object. The student object contains basic information such as the student's name and student number, while the student score object contains information such as the student's subject scores and average grade. The following is the definition of a simple student object: public

Quick Start: Implementing a Simple Library Management System Using Go Language Functions Introduction: With the continuous development of the field of computer science, the needs of software applications are becoming more and more diverse. As a common management tool, the library management system has also become one of the necessary systems for many libraries, schools and enterprises. In this article, we will use Go language functions to implement a simple library management system. Through this example, readers can learn the basic usage of functions in Go language and how to build a practical program. 1. Design ideas: Let’s first
