IOS兼容性问题,location.href 无效的解决办法
1. 利用 <a> 标签模拟点击来跳转
2. 用 window.location 来跳转
需要注意的是,IOS中这两种都不能夸协议跳转,既http跳https
打包后页面显示,但资源加载失败
- 检查打包后的
index.html中的资源加载路径与项目中publicPath与assetsDir及vue-router的base的对比,看是否有错误
- 检查是否存在协议不匹配的情况,例如
index.html中存在是否存在强制协议升级,csp,例如:
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
Dom.classList.toggle($className);
div.classList.toggle("visible");
div.classList.toggle("visible", i < 10 );
字符与ascii码互转换
大写字母A-Z对应的ASCII码值是65-90
小写字母a-z对应的ASCII码值是97-122
var str = "A";
str.charCodeAt();
var str1 = 'a';
str1.charCodeAt();
var num = 97;
String.fromCharCode(num);
var num1 = 100;
String.fromCharCode(num1);