从何说起
Access to XMLHttpRequest at 'http://127.0.0.1:3000/' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflig[......]
Access to XMLHttpRequest at 'http://127.0.0.1:3000/' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflig[......]
XMLHttpRequest是WebAPI中的标准对象,可发起Ajax请求。三步曲:
* 创建XMLHttpRequest对象;
* open方法设置请求方式及url地址;
* send方法正式发起请求;
<script>
let xhr =[......]
简单一点讲,原子组就是正则表达式中的小括号()及所包括的内容
let date = '今天是2020-09/29';
// 日期分隔符有/或-,如是分开写,会匹配出前后不一致的数据,比如2020-09/29
let reg = /\d{4}[\/\-]\d{2}[[......]
(?=exp)
(?!exp)
(?<=exp)
(?<!exp)
let password = 'aBcdefg123!'
// 数字
let reg1 = '\\d';
// 字母
let reg21[......]