<basefont>
默认字体
<font>
字体标签
<center>
水平居中
<u>
下划线
<big>
大字体
<strike>
中横线
<tt>
文本等宽
<frameset> <noframes> <frame>
可能对页面产生影响的标签
方法1:实现标签被识别
通过document.createElement(tagName)方法即可让浏览器识别新标签,浏览器支持新标签后,还可以为新标签添加CSS样式。
方法2:JavaScript框架
<!--[if lt IE 9]>
<script> src="http://html5shim.googlecode.com/svn/trunk/html5.js"</script>
<![endif]-->
必须在head标签中加载
<!--if lte IE 6]>
<script src="http://letskillie6.googlecode.com/svn/trunk/letskillie6.zh_CN.pack.js"></script>
<![endif]-->
sessionStorage用于本地储存一个会话(session)中的数据,这些数据只有在同一个会话中的页面才能访问并且当会话结束后数据也会随之销毁。
sessionStorage不是持久化的本地存储,仅仅是会话级别的存储。而localStorage用于持久化的本地存储,除非主动删除数据,否则数据是永远不回删除的
cookie保存在本浏览器中,大小不超过4K,而Storage一般不超过5M,一个域名cookie为50个,Opera为30个
transition、transform、rotate、translate
父元素 transform-style: preserve-3d;
通俗的讲:就是函数a的内部函数b,被函数a外部的一个变量引用的时候,就创建了一个闭包。
function a(){
var i=999;
function b(){ //b是一个闭包
alert(i);
}
return b;
}
var c = a();
c();
使用闭包会占用内存资源,过多的闭包会导致内存溢出
本来加在子元素身上的事件,加在了其父级身上
event对象里记录的有“事件源”,它就是发生事件的子元素
在老的IE下,事件源是 window.event.srcElement,其他浏览器是 event.target
第一个好处是效率高,比如,不用for循环为子元素添加事件了
第二个好处是,js新生成的子元素也不用新为其添加事件了,程序逻辑上比较方便
function a(){
...
}
function b(){
b.prototype = new a()
}
b.prototype.constructor = b
function a(){
...
}
function b(){
a.call(this)
}
function a(){
...
}
function b(){
var case = new a()
return case
}
4.组合继承
function a(){
...
}
function b(){
a.call(this)
}
b.prototype = new a()
b.prototype.constructor = b
function a(){
...
}
function b(){
a.call(this)
}
;(function(){ //立即执行函数前加;避免与上面相连报错
var c = function(){}
c.prototype = a.prototype
b.prototype = new c()
})();
b.prototype.constructor = b
使用event.stopPropagation()起到阻止捕获和冒泡阶段中当前事件的进一步传播。
使用event.preventDefault()可以取消默认事件
在<style>
标签中加上 scoped
<router-link to="demo2">demo2</router-link>
<router-link :to="{ name: 'demo2', params: { userId: 123 }}">demo2</router-link>
这里需要在router.js中对demo2的路径进行配置,在path中demo2后添加通配符
{
path: '/demo2/:userId',
name: 'demo2',
component: demo2
},
跳转结果为/demo2/123
<button @click="toURL">跳转页面</button>
methods:{
toURL(){
this.$router.push({ path: '/demo2' })
}
}
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- awee.cn 版权所有 湘ICP备2023022495号-5
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务