一:前后台分离开发的概念

1.前台页面运行在前台服务器上,负责页面的渲染(静态文件的加载)与转跳

2.后台代码运行在后台服务器上,负责数据的处理(提供数据请求的接口)

主要代码(前端中要导入bootstrap):

前端:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>主页</title>
    <link rel="stylesheet" href="./bootstrap-3.3.7-dist/css/bootstrap.css">
</head>
<body>

<button class="btn btn-primary">主页</button>
<a href="./login.html">登录页面</a>
<a href="./upload.html">上传页面</a>
<a href="http://127.0.0.1:8731/download">链接标签页面</a>
<button class="btn">普通标签页面</button>
<script src="bootstrap-3.3.7-dist/js/jquery-3.3.1.js"></script>
<script>
    $('.btn').click(function () {
        window.location.href='http://127.0.0.1:8731/dowmload/'
    })
</script>

</body>
</html>
index

相关文章:

  • 2022-12-23
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-28
  • 2021-09-02
  • 2022-12-23
  • 2021-12-31
猜你喜欢
  • 2022-02-11
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2021-04-21
  • 2022-01-07
相关资源
相似解决方案