03 2024 档案

摘要:arr = [1, 2, 4, 5] arrObj = Object.assign([], arr) //自定义实现数组 unshift Array.prototype.myunshift = function (...eles) { const len = this.length for (let 阅读全文
posted @ 2024-03-27 16:52 howhy 阅读(21) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2024-03-18 16:51 howhy 阅读(27) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2024-03-18 16:36 howhy 阅读(5) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2024-03-18 16:13 howhy 阅读(4) 评论(0) 推荐(0) 编辑
摘要:overflow: hidden; white-space: nowrap; text-overflow: ellipsis; 阅读全文
posted @ 2024-03-13 15:54 howhy 阅读(2) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2024-03-13 13:58 howhy 阅读(5) 评论(0) 推荐(0) 编辑
摘要://原始创建类 function UIGoods(gd) { this.data = gd this.choose = 0 } UIGoods.prototype.getTotalPrice = function () { return this.data.price * this.choose } 阅读全文
posted @ 2024-03-12 10:07 howhy 阅读(5) 评论(0) 推荐(0) 编辑
摘要:Math.ceil(1.2) //2 向上取整 Math.floor(1.3) //2 向下取整 Math.round(4.3)//4 四舍五入 Math.random() 0-10随机数 包含0但不包含10 生成0-10随机数 Math.floor(Math.random()*(10+1)) 生成 阅读全文
posted @ 2024-03-07 18:07 howhy 阅读(25) 评论(0) 推荐(0) 编辑
摘要:let age=12 console.log(false && age++) //逻辑与前一个为假就中断后面不执行 两个都为真时结果为后一个值 console.log(age) //12 console.log(true|| age++)// 逻辑或前一个为真就中断后面不执行 前一个值为真是 结果为 阅读全文
posted @ 2024-03-07 16:19 howhy 阅读(22) 评论(0) 推荐(0) 编辑
摘要:js 字符串数字与任何数字相加都会转换为字符串 任何数字与字符串数字相减(乘 除)都会转为数字 == 值是否相同 值和类型都相同 console.log(11 + '11') //1111 console.log('11' + 11) //1111 console.log(11 - '11') // 阅读全文
posted @ 2024-03-02 12:04 howhy 阅读(7) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示