会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
rojo
首页
新随笔
管理
2019年1月8日
Vue 当url为未知地址时跳转404
摘要: router.beforeEach((to, from, next) => { if (to.matched.length === 0) { from.name ? next({ name: from.name }) : next('/404'); } else { next(); } });
阅读全文
posted @ 2019-01-08 19:31 rojo
阅读(489)
评论(0)
推荐(0)
2018年9月10日
[web前端] getElementBy...() 值为null
摘要: 当js在body之前加载,Id、Tag等等未加载出来,则获取的值为null。 解决: 1. 代码放入window.onload = function() { ... }中 2.将js代码放到body之后。 3.引用外部js文件时,在script标签中加入defer="true": <script t
阅读全文
posted @ 2018-09-10 18:13 rojo
阅读(203)
评论(0)
推荐(0)