Detailed examples of how HTML can achieve free switching between files

零到壹度
Release: 2018-03-31 15:10:33
Original
2432 people have browsed it

This article mainly shares with you examples of how HTML can achieve free switching between files. Friends who need it can take a look.

The code is very simple (from simplicity to simplicity).

Create a file first. The name of the file can be arbitrary, but the name of the second file cannot be arbitrary, because the second file will be called at that time.

After creating the first file, open the file with Notepad and add the code ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ (remember to change the file suffix)

<script>
 function jump(){
  document.location="jump.html";
  }
  </script>
  <input type="button" value="jump" onclick="jump()" />
Copy after login

The next step is the second file. The file name I gave here is jump.html

Please remember if you want to change it. Also change the code in the first file to

which is the code of the first file -----------》》》》》》document. location="jump.html";

jump.html can be changed to the file name you created.


##Then there is the code ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ (remember to change the file suffix Name)

<input type="text" value="Hello Woeld" />
Copy after login

Just put these two files in the same folder.

Double-click the first file, and ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓


Click the button (jump)

to transfer to another file


This completes the switching between files, hurry up and practice it!

The above is the detailed content of Detailed examples of how HTML can achieve free switching between files. For more information, please follow other related articles on the PHP Chinese website!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!