摘要: // 读取文件base64 编码方式 var readerRes = fs.readFileSync(rp + 'ext_blocks\\userLib\\' + sessionStorage.checkLib + ".zip", "Base64") function base64toBlob(ba 阅读全文
posted @ 2021-02-02 13:47 雁字回头月满西楼 阅读(149) 评论(0) 推荐(0) 编辑
摘要: <!doctype html> <html lang="zh"> <head> <meta charset="utf-8"> <title>多文件上传</title> <script src="jquery.js"></script> <script> $(function(){ $("#btn") 阅读全文
posted @ 2020-08-20 10:34 雁字回头月满西楼 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 使用ajax上传文件时,出现了错误。数据传输的方式是通过定义formData完成的,提交的文件对象也设置为dom对象,但是还是不能发送请求。F12看到后台报了个错误:Uncaught TypeError: Illegal invocation,百度了一下,找到了解决方法。 解决方法:在ajax请求的 阅读全文
posted @ 2020-08-13 13:46 雁字回头月满西楼 阅读(2367) 评论(0) 推荐(0) 编辑
摘要: var fs=require('fs'); var stat=fs.stat; var copy=function(src,dst){ //读取目录 fs.readdir(src,function(err,paths){ console.log(paths) if(err){ throw err; } paths.forEach(function(path){ var _src=src+'/'+p 阅读全文
posted @ 2019-11-28 17:15 雁字回头月满西楼 阅读(6416) 评论(0) 推荐(0) 编辑
摘要: 在dropdown-menu中的需要处理的元素添加 data-stopPropagation=”true”,data-stopPropagation属性是用来对点击时停止传播事件,这样我们的点击事件就不会传播给Bootstrap.js中去了。调用Bootstrap的stopPropagation() 阅读全文
posted @ 2019-11-13 17:24 雁字回头月满西楼 阅读(1107) 评论(0) 推荐(0) 编辑
摘要: <a href="http://www.google.cn" onclick="return myclick();">链接到谷歌</a> <script type="text/javascript"> function myclick(){ alert('呵呵,我失效了吗?'); return false; } </script> 阅读全文
posted @ 2019-11-12 16:19 雁字回头月满西楼 阅读(567) 评论(0) 推荐(0) 编辑
摘要: this.getAttribute('data-id) 阅读全文
posted @ 2019-11-11 18:31 雁字回头月满西楼 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 1 let filePath = "" // 需要复制文件的路径 2 win.webContents.downloadURL(filePath) // 执行保存命令 阅读全文
posted @ 2019-11-07 11:01 雁字回头月满西楼 阅读(1755) 评论(0) 推荐(0) 编辑
摘要: var returned = window.confirm("请选择一个按钮单击!"); if(returned){ window.alert("您单击了“确定”按钮!"); }else{ window.alert("您单击了“取消”按钮!"); } 删除 阅读全文
posted @ 2019-09-24 11:44 雁字回头月满西楼 阅读(1444) 评论(0) 推荐(0) 编辑
摘要: 使用table标签方式将json导出xls文件 导出 阅读全文
posted @ 2019-09-16 17:44 雁字回头月满西楼 阅读(989) 评论(0) 推荐(0) 编辑