昨天给大家介绍了《用正则preg_replace把换行br替换为段落p》的方法,今天给大家再分享一点php的小代码,在php中调用javascript定时关闭浏览器窗口: ?php echo 'setTimeout("window.close()",2000);'; ? 如果不想有定时功能,而是直接关闭窗口,那么可以稍
昨天给大家介绍了《用正则preg_replace把换行br替换为段落p》的方法,今天给大家再分享一点php的小代码,在php中调用javascript定时关闭浏览器窗口:
<?php echo 'setTimeout("window.close()",2000);'; ?>
如果不想有定时功能,而是直接关闭窗口,那么可以稍微修改一下上面的代码:
<?php echo 'window.close();'; ?>
记得收藏一下,说不定啥时候都用到哦。。
原文地址:php中调用javascript定时关闭浏览器窗口, 感谢原作者分享。

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

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

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

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

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
