随笔分类 - javascript
摘要:<div id="sxt" style="width:335px;height:300px;position: relative;"></div> <div id="paiZhao" style="display: none;"> <a href="javascript:void(0)" class
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <style type="text/css"> .upper_limit_notice4 { width: 79px
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<p id="p1">JShaman是专业的JavaScript代码混淆平台,用于JS加密、JS混淆。</p> //将指定文字换成canvas function word_2_canvas(target,word,index){ var c1 = document.createElement("ca
阅读全文
摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <!-- canvas:H5新标签,在页面上绘制图形用的,(通常称它画布) canvas只是一个容器,用js脚本来控制它 --> <
阅读全文
摘要:http://www.jacklmoore.com/autosize/ https://github.com/jackmoore/autosize?tab=readme-ov-file 列表空值自动删行,末行输入,底部自动增行,不超过10行,textarea文本域自动高度没有滚动条 <div id=
阅读全文
摘要:ary.forEach(function(item,index){...}) forEach循环只能return结束本轮,不能结束整个 $.each(ary,function(index,item){...}) jq的each循环return true是结束本轮循环,return false是结束整
阅读全文
摘要:降低频率用节流,防抖只触发最后的一次 <style> #SetLimitAdd td{ line-height: 20px; padding-top: 5px; padding-bottom: 5px; } #wrapper{} .container-fluid{ width:1747px;/*实际
阅读全文
摘要:el.contains(e.target); //判断是否是子元素 let {top} = this.el.getBoundingClientRect(); //获取当前元素距离屏幕位置 insertBefore方法可以appendChild功能,insertBefore(节点,null) whil
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <link rel="stylesheet" href="http://www.h5al.cn/js/preview
阅读全文
摘要:点击框上传一张图片,并生成另一个点击框可再点击上传,修改时获取相对路径赋值多张图片,带有点击图片放大查看效果 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <li
阅读全文
摘要:express服务 //解决跨域问题,浏览8080&服务3070 let express = require('express'); let app = express(); let port = 3070; //创建服务 app.listen(port,()=>{ console.log(`服务创
阅读全文
摘要:function getData() { return new Promise((resolve, reject) => { //请求接口 $.ajax({ type: 'POST', url: "/pad/overseas/GetNeedWoodPackageList", data: { Page
阅读全文
摘要:colResizable表格列可拖动,表头不能固顶 <style type="text/css"> #colRTab{ width:100%; border-collapse: collapse; table-layout: fixed; } #colRTab td{ border:1px #ddd
阅读全文
摘要:表格超宽超高的情况,向下滚动:表头固顶,向左向右拖动,表头要随着移动。 做一个浮动表头,底部表格表头不能去掉,需要占位,监听表格x轴,移动的值给表头赋值负数left <div style="width: 1554px;overflow: hidden;height: 32px;position: a
阅读全文
摘要:拿到数据必须在response.text()之后,如果在{}里可以直接在第一个.then(data)拿到,如果没有在{}说明第一个then返回了值,在第二个then里的data拿 fetch('/admin/ArrivalMaster/WarehouseSelectList1').then((res
阅读全文
摘要:动画 #status{ border:1px solid #ff9900; width:50px; height:100px; left:0; position: absolute; } <div id="status">123</div> let div = document.getElement
阅读全文
摘要:<div><image id="box" src="https://www.baidu.com/img/flexible/logo/pc/result.png"></div> <canvas id="kkk" width="400" height="400"></canvas> let box =
阅读全文
摘要:base64图复制到剪切板 谷歌和360浏览器只在https协议或本机操作localhost下有效,其他情况只能用document.execCommand("copy"),并且只能粘贴到word或excel中,不能粘贴到画图 var self = this if(self.curMuban.MBSL
阅读全文