赞
踩
使用filter(),concat(),slice()方法操作数组,不会更新视图;
使用push(),pop(),shift(),unshift(),splice(),sort(),reverse()方法操作数组,会触发视图更新
给标签添加一个属性 :popper-append-to-body=“false” popper-class Select 下拉框的类名
// 绑定事件
onselectstar = “return false”;
// 设置样式
.class{
User-select:none;
}
Var obj = document.getElementById(“”);
obj .select();
Document.execCommand(‘copy’);
// 获取导出内容,设置文件格式
Let blob = new Blob([内容],{‘type’:’text/xml’})
// 通过a标签导出
If(‘download’ in document.creatElement(‘a’)){
Const alink = document.createObjectURL(‘a’)
Alink.href = URL.createObjectURL(blob)
Alink.setAttribute(‘download’,文件名)
Alink.click()
Window.URL.revokeObjectURL(blob)
}else{
navigator.msSaveBlob(blob,文件名)
}
This.$refs.upload.clearFiles();
var obj = eval('(' + str + ')');
var obj = str.parseJSON();
var obj = JSON.parse(str);
$.parseJSON(jsonStr);
(new Function('return' +str1 ))();
switch (表达式)
{
case 常量表达式1: 语句1
case 常量表达式2: 语句2
┇
case 常量表达式n: 语句n
default: 语句n+1
}
$.bootstrap(‘filterBy’,{});
// 页面刷新 Window.onbeforeunload = function(e){ e.returnValue = false e.preventDefault(); } // 页面后退 History.pushState('参数对象','名称','url 可选'); // popstate事件 Window.addEventListener(‘popstate’, function(){ History.pushState(null,null,document.URL); } // 右键点击事件 Document.oncontextmenu = function(){ return false; }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。