如何在winscp上将两个html文件链接在一起?我正在连接到我的大学linux服务器并在服务器上运行网站。我对html很新,所以这可能是一个愚蠢的问题,但我无法让它工作。我在这里有一个主页:
<!DOCTYPE html>
<html lang="en">
<head>
<title>.</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
</head>
<body style="height:1500px">
<div class="container-fluid">
<br>
<h3>Welcome to my website!</h3>
<p>Here I will share with you my interests</p>
<p>Scroll down and enjoy!</p>
</div>
<nav class="navbar navbar-expand-sm bg-dark navbar-dark sticky-top">
<a class="navbar-brand" href="https://www.mywebsite.com">Home</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="https://www.google.ie/">Google</a>
</li>
<li class="nav-item">
<a class="nav-link" href="login.html">Login</a>
</li>
</ul>
</nav>
<div class="container-fluid"><br>
<p>Click on Home to go to the homepage, which is the homepage</p>
<p>Click on Google in the nav bar to go to www.google.com</p>
<p>Click on Login to go to the login screen</p>
<p>...</p>
</div>
</body>
</html>
我有一个登录页面,该页面是从主页上的导航栏链接的:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Vertical (basic) form</h2>
<form action="/action_page.php">
<div class="form-group">
<label for="email">Email:</label>
<input type="email" class="form-control" id="email" placeholder="Enter email" name="email">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd" placeholder="Enter password" name="pwd">
</div>
<div class="checkbox">
<label><input type="checkbox" name="remember"> Remember me</label>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
</body>
</html>
当我点击导航栏中的登录时,我希望浏览器转到登录页面。在服务器上,login.hbs(登录页面)和layout.hbs(主页)都在同一个文件夹中。我该怎么做呢?我尝试使用href =“login.hbs”和href的许多其他方法,但我无法让它工作。我得到的只是404错误。我该怎么办?