current position:Home>HTML button jump

HTML button jump

2022-02-03 02:39:03 CSDN Q & A

img

img


pycharm How to set Click button Then jump to the local templates Other in the folder html page




Refer to the answer 1:
  <button onclick="goTo()"></button><script> function goTo() { window.location.href = './path.html' //  Jump path  } </script>



Refer to the answer 2:



Refer to the answer 3:

html There are two ways to write jump according to the path , Absolute path and relative path , We usually use relative paths , That is, relative to the file you are editing , Which file do you want him to find , in addition ../ It's a higher level catalog ,./ Follow @, There seem to be different path definitions in different places , If write Vue I remember Vite Can be defined in @ Path format ,./ It's like src Catalog , For your question here , Use... According to your directory structure ../ Just splice with the file path ~




Refer to the answer 4:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202030239013423.html

Random recommended