search
HomeWeb Front-endJS TutorialHow to use JS location.href to jump out of the frame and open a new page_javascript skills

I encountered a problem today. In the frame, when the login is judged to be invalid, I need to return to the login page, but the login page is opened within the frame. I want it to open directly out of the frame (this is not a new window), and finally I found a method online and share it with everyone:

echo "";

The original content is as above. If you want it to jump out of the frame and open the login page, you need to use the following method:

echo " ";

In fact, just add a window.top before the jump link. If you are opening a new window, you can use js's window.open("url","open method"); to open the new window.

Statement
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
Nginx服务器中location配置实例分析Nginx服务器中location配置实例分析May 24, 2023 pm 02:05 PM

首先我来大概的介绍一下location的种类和匹配规则,以nginxwiki的例子做说明:location=/{#matchesthequery/only.[configurationa]}location/{#matchesanyquery,sinceallqueriesbeginwith/,butregular#expressionsandanylongerconventionalblockswillbe#matchedfirst.[configurationb]}location^~/im

nginx location中uri的截取如何实现nginx location中uri的截取如何实现May 18, 2023 pm 12:07 PM

说明:location中的root和aliasroot指令只是将搜索的根设置为root设定的目录,即不会截断uri,而是使用原始uri跳转该目录下查找文件aias指令则会截断匹配的uri,然后使用alias设定的路径加上剩余的uri作为子路径进行查找location中的proxy_pass的uri如果proxy_pass的url不带uri如果尾部是"/",则会截断匹配的uri如果尾部不是"/",则不会截断匹配的uri如果proxy_pass的url带uri

Nginx怎么配置location与rewrite规则Nginx怎么配置location与rewrite规则May 18, 2023 pm 12:25 PM

location教程示例:location=/{#精确匹配/,主机名后面不能带任何字符串[configurationA]}location/{#因为所有的地址都以/开头,所有这条规则将匹配到所有请求#但是正则和最长字符串会优先匹配[configurationB]}location/documents/{#匹配任何以/documents/开头的地址,匹配符合以后,还要继续往下搜索#只有后面的正则表达式没有匹配到时,这一条才会采用[configurationC]}location~/document

Nginx服务器中的location怎么配置Nginx服务器中的location怎么配置May 14, 2023 pm 07:16 PM

语法location[=|~|~*|^~]/uri/{...}规则=:表示精确的uri匹配(有兴趣的同学可以看一下url和uri的区别)~:表示区分大小写的正则匹配~*:表示不区分大小写的正则匹配!~&&!~*:表示区分大小写不匹配的正则和不区分大小写的不匹配的正则/:通用匹配,任何请求都会匹配到location匹配目标location匹配测试只使用请求uri的部分,而不使用参数部分。(原因:参数的写法太多,无法精确匹配)location匹配顺序多个location配置的前提下,

Nginx Location指令URI匹配规则是什么Nginx Location指令URI匹配规则是什么May 14, 2023 pm 11:58 PM

1、介绍location指令是http模块当中最核心的一项配置,根据预先定义的url匹配规则来接收用户发送的请求,根据匹配结果,将请求转发到后台服务器、非法的请求直接拒绝并返回403、404、500错误处理等。2、location指令语法location[=|~|~*|^~|@]/uri/{…}或location@name{…}3、uri匹配模式location指令分为两种匹配模式:1>普通字符串匹配:以=开头或开头无引导字符(~)的规则2>正则匹配:以~或~*开头表示正则匹配,~*

Nginx中Server和Location的匹配逻辑是什么Nginx中Server和Location的匹配逻辑是什么May 12, 2023 am 11:10 AM

server的匹配逻辑nginx在决定请求由哪个server块执行时,主要关注的是server块中的listen和server_name两个字段listen指令listen字段定义server响应的ip和端口,如果没有明确配置listen字段,默认监听0.0.0.0:80(root)或者0.0.0.0:8080(非root)listen可以被配置为:一个ip和端口的组合一个单独的ip,默认监听80端口一个单独的端口,默认监听所有的ip接口一个unixsocket路径其中最后一项通常只用于在不同的

nginx location和proxy_pass的区别是什么nginx location和proxy_pass的区别是什么May 16, 2023 pm 03:16 PM

前置测试访问域名:www.test.com/api/upload1.location和proxy_pass都带/,则真实地址不带location匹配目录location/api/{proxy_passhttp://127.0.0.1:8080/;}访问地址:www.test.com/api/upload-->http://127.0.0.1:8080/upload2.location不带/,proxy_pass带/,则真实地址会带/location/api{proxy_passhttp:/

nginx location匹配的方法nginx location匹配的方法May 15, 2023 pm 02:25 PM

nginxlocation匹配实例详解例1、nginx配置:例2、nginx配置:例3、nginx配置:

See all articles

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA

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

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version