截取前24个字符
value.substring(0,24)
...
yekong
2年前 (2022-01-31) 715℃
0喜欢
var timestamp = (new Date()).valueOf();
...
yekong
2年前 (2022-01-21) 1620℃
0喜欢
方法 isNaN进行判断
var datas = 0
if (!isNaN(dataList[i].value)) {
datas = dataList[i].value
}
...
yekong
2年前 (2022-01-19) 634℃
0喜欢
安装依赖
npm install hex-alpha
使用实例
import hexAlpha from "hex-alpha";
hexAlpha("#fa6d01", 0.1);
// returns "rgba(250...
yekong
2年前 (2022-01-09) 915℃
0喜欢
var randomNum = ('000000' + Math.floor(Math.random() * 999999)).slice(-6);
console.log(randomNum)
...
yekong
2年前 (2022-01-04) 941℃
0喜欢
一.判断是否为数组类型
var a=[0];
document.write(isArray(a),'<br/>');
function isArray(obj){
return (typeof obj=='object')...
yekong
2年前 (2022-01-04) 827℃
0喜欢
js ajax jsonp 访问接口避免跨域
$.ajax({
url: '',
type: 'GET',
dataType: 'jsonp', //指定服务器返回的数据...
yekong
2年前 (2022-01-04) 921℃
0喜欢
var str = "aaabbbcccdddeeefff";
str = str.match(/aaa(\S*)fff/)[1];
alert(str);//结果bbbcccdddeee
实际运用 获取目录内容并将文件夹名称提取出来
const f...
yekong
2年前 (2021-12-31) 1221℃
0喜欢
computed: {
getdays() {
let days = 0
if (this.data.billExpireDate) {
days = ...
yekong
2年前 (2021-12-27) 1838℃
1喜欢
function gettotal(listdata) {
let total = 0
listdata.forEach((type) => {
total = total + type
});
return total
}
...
yekong
2年前 (2021-12-22) 979℃
0喜欢