Home > Web Front-end > JS Tutorial > Problem with jumping page in javascript showModalDialog_javascript skills

Problem with jumping page in javascript showModalDialog_javascript skills

WBOY
Release: 2016-05-16 18:15:32
Original
1144 people have browsed it

After checking the code, I found that location is used in the jump link, but if the link generated by A is used directly, a new page will not pop up when clicking to jump.
Solution:
Use JS script to simulate clicking on a link like A without using location. Try it:

Copy code The code is as follows:

function go_link(url) {
var link = document.createElement("a");
link.href = url;
document.body.appendChild(link);
link.click();
}

Where location is called, call the go_link method instead.
Must cooperate with

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template