随笔分类 -  JS

摘要:<script> let URL = "http://www.baidu.com?name=elephant&age=25&sex=male&num=100" function queryURLParams(URL) { // const url = location.search; // 项目中可 阅读全文
posted @ 2022-03-21 11:45 JaneLifeVlog 阅读(114) 评论(0) 推荐(0)
摘要:const getURLParameters = url => (url.match(/([^?=&]+)(=([^&]*))/g) || []).reduce( (a, v) => ( (a[v.slice(0, v.indexOf('='))] = v.slice(v.indexOf('=') 阅读全文
posted @ 2021-09-09 09:21 JaneLifeVlog 阅读(48) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
posted @ 2021-01-26 09:53 JaneLifeVlog 阅读(49) 评论(0) 推荐(0)
摘要:**html ** <!-- 回到顶部 --> <div class="go_top" @click="goTop" :class="go_top_flag == true ? 'go_top_show' :''"> <van-icon name="back-top" class="go_top_i 阅读全文
posted @ 2020-11-25 10:36 JaneLifeVlog 阅读(150) 评论(0) 推荐(0)
摘要:<div id="flash"> <a href="javascript:void(0)" id="prev"><img src="../images/left_icon.png" alt=""></a> <a href="javascript:void(0)" id="next"><img src 阅读全文
posted @ 2020-11-10 17:06 JaneLifeVlog 阅读(45) 评论(0) 推荐(0)
摘要:Object.assign() 用法一:合并多个对象 const obj1 = {aa:1} const obj2 = {bb:2} const obj3 = {cc:3} const obj = Object.assign(obj1, obj2, obj3) // {a:1, b:2, c:3} 阅读全文
posted @ 2020-11-05 17:50 JaneLifeVlog 阅读(67) 评论(0) 推荐(0)
摘要:使用&&/|| if(conected){ login(); } //上述可以简写为:conected && login(); if(a为真){ a=a }else{ a=b } //上述可以简写为:a = a || b 使用三元表达式 if(a==b){ a=c }else{ a=d } 可写成: 阅读全文
posted @ 2020-11-04 09:12 JaneLifeVlog 阅读(358) 评论(0) 推荐(0)
摘要:$(document).ready(function(){ $(".header").load("header.html"); $(".nav-left").load("nav.html",function(){ var links = $(".nav-left li a"), index = 0, 阅读全文
posted @ 2020-11-02 18:00 JaneLifeVlog 阅读(363) 评论(0) 推荐(0)
摘要:html结构 左侧用户名单 <div class="layui-tab-item layui-show"> <ul class="userp-user-list" id="myTable"> <li><div><a href="javascript:void(0)">用户1</a></div></l 阅读全文
posted @ 2020-11-02 15:30 JaneLifeVlog 阅读(318) 评论(0) 推荐(0)