随笔分类 -  JS知识点

摘要:问题背景: 在使用a标签下载文件时,download属性可以更改下载的文件 // 下载a.exe,并采用默认命名 <a href="/images/a.exe" download>点击下载</a> // 将a.exe改名为b.exe下载 <a href="/images/a.exe" downloa 阅读全文
posted @ 2024-05-29 16:52 study_php_java_C++ 阅读(790) 评论(0) 推荐(0) 编辑
摘要:方式: 在url上添加参数,如果已经存在则替换 url = "http://www.test.com?a=1&b=2"const urlO = new URL(url); urlO.searchParams.set('redirectURL', url2); 阅读全文
posted @ 2023-03-09 09:24 study_php_java_C++ 阅读(106) 评论(0) 推荐(0) 编辑
摘要:1. nvm安装及使用参照: https://www.cnblogs.com/sunbenbao/p/16587644.html Node版本管理器--nvm,可以运行在多种操作系统上。nvm for windows 是使用go语言编写的软件。分享下在此操作系统上nvm的安装和使用。 主要用途: 切 阅读全文
posted @ 2022-12-14 16:37 study_php_java_C++ 阅读(310) 评论(0) 推荐(0) 编辑
摘要:demo: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>进度条属性上传</title> </head> <body> <form method="post" enctype="multipart/form-data"> <i 阅读全文
posted @ 2022-09-27 19:16 study_php_java_C++ 阅读(100) 评论(0) 推荐(0) 编辑
摘要:写一个js (function() { 'use strict'; const mWidth = 750; // 减少dom操作 const doc = document.documentElement; function resize(){ // 获取dom文档宽 const deviceWidt 阅读全文
posted @ 2022-06-23 13:37 study_php_java_C++ 阅读(20) 评论(0) 推荐(0) 编辑
摘要:<!-- 提示:如果你不想用form,你可以换成div等任何一个普通元素 --> <form class="layui-form"> <div class="layui-form-item"> <label class="layui-form-label">复选框</label> <div clas 阅读全文
posted @ 2022-06-21 10:32 study_php_java_C++ 阅读(1181) 评论(0) 推荐(0) 编辑
摘要:代码: <template> <div> <ul class="ulBox" id="ulBox"> <li class="li" :id="'id'+item" v-for="(item,index) in list" :key="index"> {{item}} </li> </ul> </di 阅读全文
posted @ 2022-06-20 13:01 study_php_java_C++ 阅读(317) 评论(0) 推荐(0) 编辑
摘要:1.jq-signature http://bencentra.github.io/jq-signature/ 支持的jquery版本低 2.HTML5 canvas http://www.htmleaf.com/Demo/201505281922.html 支持的jquery版本低 3. sign 阅读全文
posted @ 2021-06-18 16:37 study_php_java_C++ 阅读(388) 评论(0) 推荐(0) 编辑
摘要:官网文档: http://html2canvas.hertzen.com/ 使用的是 jquery 3.2.1 html2canvas 1.0.0-rc.7 截取根据id的指定区域: var canvasOtherTopHeight = $('.heading').height() + 31 + $ 阅读全文
posted @ 2021-06-18 11:48 study_php_java_C++ 阅读(3567) 评论(0) 推荐(0) 编辑
摘要:使用下面方法在监听普通的input的change事件正常 $('#pp').on('change', 'input.videos_poster_input', function () { console.log(' '); }) 以上代码在监听动态添加的input的事件就失效 可以采用以下方式:将父 阅读全文
posted @ 2021-06-18 10:52 study_php_java_C++ 阅读(1141) 评论(0) 推荐(0) 编辑
摘要:function getObjectURL(file) { var url = null; if (window.createObjectURL != undefined) { // basic url = window.createObjectURL(file); } else if (windo 阅读全文
posted @ 2021-06-18 09:57 study_php_java_C++ 阅读(389) 评论(0) 推荐(0) 编辑
摘要:$('video').trigger('play'); $('video').trigger('pause'); 判断video播放器的播放状态,并进行切换播放,需要这样 let video = $('video').get(0); if(video.paused) { video.play(); 阅读全文
posted @ 2021-06-04 18:07 study_php_java_C++ 阅读(972) 评论(0) 推荐(0) 编辑
摘要:window.frameElement 返回嵌入当前window对象的元素(比如 <iframe> 或者 <object>),如果当前window对象已经是顶层窗口,则返回null. var frameId = window.frameElement && window.frameElement.i 阅读全文
posted @ 2021-02-21 16:35 study_php_java_C++ 阅读(49) 评论(0) 推荐(0) 编辑
摘要:(function(){ var fnUrlReplace = function (eleLink) { if (!eleLink) { return; } var href = eleLink.href; if (href && /^#|javasc/.test(href) false) { if 阅读全文
posted @ 2021-01-21 10:01 study_php_java_C++ 阅读(421) 评论(0) 推荐(0) 编辑

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