核心:更新视图不重新请求页面。 路由的hash模式和history模式。 看上去,hash模式就比history模式多了一个#。无论是hash模式还是history模式,在发生改变的时候,浏览器都会新增一个记录,我们就是通过这个记录来实现更新视图但是重新请求页面。 hash("#") 的作用是加载 ...
分类:
其他好文 时间:
2020-06-04 01:45:19
阅读次数:
75
 ;//警示弹框 提示输入框 var num=window.prompt("请输入一个数:"); document.write(num); 确定取消框 var kuang=window.confirm("你确定要退出吗"); document.wri ...
分类:
其他好文 时间:
2020-06-01 14:08:01
阅读次数:
61
安装vue-routernpm i vue-router -S1配置1、创建文件夹与文件创建一个router文件夹,在文件夹中创建两个文件,分别是router.js和routes.js文件。 2、编辑文件router.js(路由配置文件) import Router from 'vue-router ...
分类:
其他好文 时间:
2020-05-31 21:56:03
阅读次数:
83
The Web Makes it Easy to Use 万维网的诞生:利用CERN这个拥有世界上最先进的高能物理设施的核子研究中心作为实验基础,以解决“只有知道数据具体存储 位置才能访问、调取数据”这一问题为目的,将顶部浏览器和底层数据库分割,实现了利用链接从一个站点跳到另一个站点,彻底 摆脱了以 ...
分类:
Web程序 时间:
2020-05-31 01:04:11
阅读次数:
114
Life is short or long, sometimes lost and sinking, and sometimes fearless and strong. In the vast river of history, there is always a section of my ow... ...
分类:
其他好文 时间:
2020-05-30 15:26:55
阅读次数:
95
window.onpopstate = console.log window.onhashchange = console.log 1. history.pushState({a:1,b:2}, 'title', '/test') // /test 2. history.pushState({tes ...
JS内置对象 Window对象document、history、location、navigator、screen 返回相应对象的引用parent、self、top 分别返回父窗口、当前窗口和最顶层窗口的对象引用screenLeft、screenTop、screenX、screenY 返回窗口的左上 ...
分类:
Web程序 时间:
2020-05-28 16:43:07
阅读次数:
77