Home > Web Front-end > JS Tutorial > Specific implementation of input link pages, opening new web pages, etc. _javascript skills

Specific implementation of input link pages, opening new web pages, etc. _javascript skills

WBOY
Release: 2016-05-16 17:06:04
Original
1030 people have browsed it

1. Link to a page


onclick="location.href='filename. html'" />

2. Return (equivalent to back)


onclick=" location.href='javascript:history.go(-1);'" value="Return" />

3. Open a new webpage


onclick="window.open('filename.html')" />

4. Open a new borderless window



5. Open a new webpage and point to another page



6. Open a new window without borders and point to another page One page



7. Click the button to pop up the confirmation alert window

Method 1:
onClick="alert('Confirm submission?');location.href= 'filename.html';return false;" >
Method 2:
onClick="if (confirm('Confirm submission?'))location.href= 'filename.html';return false;" >

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