Day03-Ajax,前后端分离开发,前端工程化,Vue组件库Element,Vue路由,打包部署



1. AXios



html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
    <input type="button" value="get" onclick="get()"><br>
    <input type="button" value="post" onclick="post()"><br>
</body>
<script>
    function get(){
        axios({
            methods: 
            "get",
            url:"https://unpkg.com/axios/dist/axios.min.js"
        }).then(result=>{
            console.log(result.data)
        })
    }    
    function post(){
        axios({
            methods: 
            "post",
            url:"https://unpkg.com/axios/dist/axios.min.js",
            data:"id=1"
        }).then(result=>{
            console.log(result.data)
        })
    }
</script>
</html>



3. 前端工程化

环境准备

nodejs安装过程的

vue项目简介

vue项目开发流程








相关推荐
胡萝卜术6 小时前
当大模型遇上浏览器:用 React + WebGPU 在前端跑通 DeepSeek-R1 的实战笔记
前端·javascript·面试
不好听6136 小时前
Tailwind CSS 原子化 CSS 完全入门:为什么现代前端开发都在用?
前端·css
触底反弹6 小时前
🔥 React 零基础入门(上):环境搭建 + JSX 深度解析
前端·react.js·typescript
why技术6 小时前
分享一套我一直在使用的 AICoding 组合拳,小而美的典范。
前端·后端·ai编程
朦胧之7 小时前
AI应用-消费流式输出
前端·javascript·ai编程
小林ixn7 小时前
在浏览器跑通 15 亿参数大模型:我用 React + WebGPU 复刻了 DeepSeek-R1
前端·react.js·前端框架
Csvn7 小时前
容器查询 @container 实战:告别无休止的媒体查询
前端
稚南城才子,乌衣巷风流9 小时前
函数:编程中的核心概念
开发语言·前端·javascript
IT_陈寒10 小时前
为什么我的JavaScript异步代码总是不按顺序执行?
前端·人工智能·后端
索西引擎11 小时前
【React】useState 状态更新机制:批量更新策略与“异步“错觉的深层解析
前端·react.js·前端框架