阅读全文>>
阅读全文>>
什么是跨域?
跨域是指一个域下的文档或脚本试图去请求另一个域下的资源,这里跨域是广义的。
广义的跨域:
1.) 资源跳转: A链接、重定向、表单提交
2.) 资源嵌入: <link>、<script>、<img>、<frame>等dom标签,还有样式中background:url()、@font-face()等文件外链
3.) 脚本请求: js发起的ajax请求、dom和js对象的跨域操作等
其实我们通常所说的跨域是狭义的,是由浏览器同源策略限制的一类请求场景。
什么是同源策略?
同源策略/SOP(Same origin ...阅读全文>>
阅读全文>>
阅读全文>>
阅读全文>>
在Vue项目开发中我们经常要向页面中添加背景图片,可是当我们在样式中添加了背景图片后,由于路径解析的问题,图片并不能够正确的显示出来,如下CSS样式:
dom.target.style.background="url(../../assets/input-b.png) no-repeat center";
我们需要这样设置:
dom.target.style.background="url(" + require("../../assets/input-b.png") + ") no-re...阅读全文>>
欢迎回来 请登录阅读全文>>
1.可以在不需要默认填写的input框中设置 autocomplete="new-password"
2.修改readonly属性
<input type="password" readonly onfocus="this.removeAttribute('readonly');"/>
3. 通常我们会在form表单上加入autocomplete="off" 或者 在输入框中加入autocomplete="off"
<form method="post" action="" name="login" autocomplete...阅读全文>>
阅读全文>>