Home Web Front-end JS Tutorial How to save data when closing the window in asp javascript_javascript skills

How to save data when closing the window in asp javascript_javascript skills

May 16, 2016 pm 07:07 PM
asp save data close the window

How to save data when closing the window

---------------

Use onunload event to open the above file

quit.asp A file that saves data. The above file is used to detect whether the window is closed or refreshed.

IE5 is compatible. In the past, window.opener.closed was used to determine, but IE5 does not support the closed attribute.
The above code has been tested many times and no problems have been found for the time being <script> <BR>  function IfWindowClosed() <BR>  {   <BR>    var win = null; <BR>    try <BR>    { <BR>      window.opener.name = "ss"; <BR>      if ( window.opener.name != "ss" ) <BR>      { <BR>        win = window.open("quit.asp","","width=100,height=100,left=10000,top=10000"); <BR>        window.setTimeout("window.close();",0); <BR>      } <BR>      window.opener.name = ""; <BR>    } <BR>    catch(e) <BR>    { <BR>      win = window.open("quit.asp","","width=100,height=100,left=10000,top=10000"); <BR>      window.setTimeout("window.close();",0); <BR>    } <BR>  } <BR>   <BR>  window.setInterval("IfWindowClosed()",100); <BR>  window.setTimeout("window.close();",510); <BR></script>

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What are the built-in objects in asp? What are the built-in objects in asp? Nov 09, 2023 am 11:32 AM

ASP built-in objects include Request, Response, Session, Application, Server, Session.Contents, Application.Contents, Server.CreateObject, Server.MapPath, Server.Execute, Server.Transfer, etc. Detailed introduction: 1. Request: represents HTTP request object, etc.

How to save data in Win11 sandbox? Tutorial on saving data in Win11 sandbox How to save data in Win11 sandbox? Tutorial on saving data in Win11 sandbox Feb 20, 2024 am 11:36 AM

The win11 sandbox is a built-in security feature of the computer. It allows users to run programs safely in an isolated environment. However, many users are asking how to save data in the win11 sandbox? Users can directly select local file storage and then search. Let this site carefully introduce to users how to save data in the Win11 sandbox. How to save data in Win11 sandbox

What is the shortcut key to close the window in Win7? Detailed introduction of common shortcut keys in Win7 What is the shortcut key to close the window in Win7? Detailed introduction of common shortcut keys in Win7 Jul 12, 2023 pm 08:13 PM

There are still many people using the Win7 system. Compared with other software, the Win7 system is very stable. Then a customer asked me what is the shortcut key to close the window in Win7? The editor below will introduce to you the Win7 shortcut keys to close the window and some more commonly used shortcut keys. Win7 shortcut keys to close windows and common shortcut keys are introduced: 1. ALT+F4 to close the current dialog box (software and games can be closed with this shortcut key) 2. Ctrl+W to close the current page (applicable When multiple pages are opened during a web search, hold down Ctrl and click w multiple times to close the current pages one by one) Win7 common shortcut keys: 1. Ctrl+Shif

Learn how to save data to localstorage using different methods Learn how to save data to localstorage using different methods Jan 13, 2024 am 10:39 AM

How to use localStorage to save data: five methods explained in detail. In front-end development, it is often necessary to save data on the browser side for next time use. localStorage is a mechanism for saving data in the browser. It can conveniently store data in an object named "localStorage" in the user's browser. In this article, we will introduce in detail how to use localStorage to save data, including five different ways, and give specific code examples

What are the asp development tools? What are the asp development tools? Oct 23, 2023 am 11:02 AM

ASP development tools include Visual Studio, Dreamweaver, FrontPage, EditPlus, UltraEdit, SQL Server Management Studio, RAD Studio, Delphi, Asp.NET and Oracle SQL Developer.

asp scanning tool vulnerability detection asp scanning tool vulnerability detection Oct 13, 2023 am 10:45 AM

ASP scanning tool vulnerability detection: 1. Select the appropriate scanning tool; 2. Configure the scanning target in the scanning tool; 3. Configure scanning options as needed; 4. After the configuration is completed, start the scanning tool to start scanning; 5. Scanning tool A report will be generated listing the detected vulnerabilities and security issues; 6. Fix the detected vulnerabilities and security issues according to the recommendations in the report; 7. After fixing the vulnerability, re-run the scanning tool to ensure that the vulnerability has been successfully exploited repair.

How to manually detect vulnerabilities in asp How to manually detect vulnerabilities in asp Oct 13, 2023 am 10:49 AM

ASP manual detection of vulnerabilities: 1. Check the ASP application's verification and filtering mechanism for user input; 2. Check the ASP application's encoding and filtering mechanism for output data; 3. Check the ASP application's authentication and session management mechanism; 4. Check the ASP application's permission control on files and directories; 5. Check the ASP application's handling of errors; 6. Check the ASP application's database security; 7. Check the ASP application's configuration file and server configuration.

What are the methods for detecting asp vulnerabilities? What are the methods for detecting asp vulnerabilities? Oct 13, 2023 am 10:42 AM

Methods include: 1. Use specialized vulnerability scanning tools; 2. Manual testing to discover and verify vulnerabilities in ASP applications; 3. Conduct security audits to check the code and configuration files of ASP applications; 4. Use vulnerability exploitation frameworks; 5. Review the code of the ASP application.

See all articles