随笔分类 - JavaScript
摘要:js 日期对象 31 号, setMonth 的锅 解决办法,先setDate(1) let currentDate = new Date(); function getLastShortMonth(date) { if (!date) { date = currentDate; } else {
阅读全文
摘要:AntV <script src="x6.js"></script> <script> const Graph = X6.Graph; const Shape = X6.Shape; const Addon = X6.Addon; </script>
阅读全文
摘要:oninput 当input的value值发生变化时就会触发,与onchange的区别是不用等到失去焦点就可以触发了。
阅读全文
摘要:参考 <el-input class="pro_input" v-model="formData.astrict" type="number" step="1" min="0" max="10000" size="mini" @keyup.native="proving1"></el-input>
阅读全文
摘要:js拷贝函数怎么操作 使用bind()方法 JavaScript的函数提供了bind()方法,可以用来创建一个新函数,该函数与原函数具有相同的代码,但其上下文和部分参数可以绑定。通过使用空的上下文和参数,可以实现函数的拷贝。 function originalFunction() { console
阅读全文
摘要:官方中文文档 在浏览器环境下,用Excel.js读取excel文件 因为SheetJS读取样式的那一部分是收费的(具体原因是因为有人花钱找他们开发的,再免费对花钱的人不公平),所以找到了ExcelJS ExcelJS 安装ExcelJS npm install exceljs exceljs.min
阅读全文
摘要:https://docs.sheetjs.com/docs/demos/network#xmlhttprequest var filename = 'Test.xlsx'; var req = new XMLHttpRequest(); req.open('GET', filename, true)
阅读全文
摘要:从此不再惧怕URI编码:JavaScript及C# URI编码详解 #encodeURI-->Uri.EscapeUriString
阅读全文
摘要://主页面去除滚动条,仅iframe内有滚动条 var menuFrame = document.getElementById('menuFrame'); //赋予iframe初始高度 menuFrame.height = window.innerHeight - document.getEleme
阅读全文
摘要:搞清clientHeight、offsetHeight、scrollHeight、offsetTop、scrollTop Window 尺寸 网页可见区域高 document.body.clientHeight 网页正文全文高 document.body.scrollHeight 网页可见区域高(包
阅读全文
摘要:看看我 /* output format determined by filename */ XLSX.writeFile(workbook, 'out.xlsb'); /* at this point, out.xlsb will have been downloaded */
阅读全文
摘要:看看我 table_to_book 和 table_to_sheet工具函数获取DOM的TABLE元素,并且通过子节点进行迭代。 var workbook = XLSX.utils.table_to_book(document.getElementById('tableau')); /* DO SO
阅读全文
摘要:看看我 读取日期为new Date()格式 Tue May 18 2021 11:10:17 GMT+0800 (中国标准时间) //非IE的xlsx文件的单元格日期原始值会少43秒或44秒 //读取Excel数据 function getExcelData(file, callback) { va
阅读全文
摘要:版本一 <script> $(function () { //根据contentDocument的高度调整menuFrame的高度 var menuFrame = document.getElementById('menuFrame'); menuFrame.addEventListener('lo
阅读全文
摘要:看看我1 看看我2 Object.keys() Object.values() <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Test</title> <scrip
阅读全文
摘要:看看我 var jsonData = XLSX.utils.sheet_to_json(excelData.Sheets[excelData.SheetNames[0]], { defval: '' //单元格为空时的默认值 });
阅读全文
摘要:看看我 for-in Object.keys(obj) //取值: Object.values(obj); Object.getOwnPropertyNames(obj)
阅读全文

浙公网安备 33010602011771号