如何使用Visual Studio Code创建和链接另一个网页?

编程入门 行业动态 更新时间:2024-10-26 15:13:05
本文介绍了如何使用Visual Studio Code创建和链接另一个网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当前,我正在在线学习使用1个index.html文件和1个app.js文件的教程,这些文件仅占1页.但是,我想有多个页面,只需单击一个按钮就可以来回链接,我如何有多个页面?

Currently I am following tutorials online that uses 1 index.html file, and 1 app.js file that results in only 1 page. However I would like to have multiple pages, that links back and forth with a click of a button, how do I have multiple pages?

我是否必须将所有页面编码在同一个index.html文件中?还是我需要创建另一个html?

Do I have to code all the pages in the same index.html file? Or do I need to create another html?

推荐答案

还是我需要创建另一个html?

Or do I need to create another html?

是的.除非您正在构建SPA或使用服务器端代码动态生成HTML,否则:每个HTML文件都是一个页面.

Yes. Unless you are building a SPA or dynamically generating your HTML with server side code: Each HTML file is a page.

通过单击按钮来回链接

that links back and forth with a click of a button

< a> 元素用于在页面之间创建链接.

The <a> element is used to create links between pages.

<a href="url-of-other-page.html">Other page</a>

更多推荐

如何使用Visual Studio Code创建和链接另一个网页?

本文发布于:2023-08-07 10:41:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1318674.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   链接   网页   Studio   Visual

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!