随笔分类 -  js

摘要:有个上传按钮,点击后才会渲染新的元素出来,也就是<input type='file'>文件选择按钮 然后要点击选择按钮才能选择文件。 由于不知道是什么插件渲染的,不想动源代码,用定时任务,等待按钮出现后,再用js点击该按钮,完成修改。 阅读全文
posted @ 2020-08-14 10:00 覃上 阅读(672) 评论(0) 推荐(0)
摘要:$('#textarea_').bind('input propertychange','textarea',function(){ maxApplicant();}); 阅读全文
posted @ 2020-07-16 13:12 覃上 阅读(1461) 评论(0) 推荐(0)
摘要:$.ajax({ method:'POST', url:'/midservice/studentAction/addStudent', data:$.toJSON(userDate), async:false, cache : false, dataType:"json", crossDomain 阅读全文
posted @ 2020-07-07 09:06 覃上 阅读(131) 评论(0) 推荐(0)
摘要:axios({ method:"POST", // url:configure.state.gateway, url:'/api', // headers: { // "Content-Type": "multipart/form-data", // 'Content-Type': 'applica 阅读全文
posted @ 2020-07-06 15:15 覃上 阅读(179) 评论(0) 推荐(0)
摘要:跨域解决一:response.setHeader("Access-Control-Allow-Origin", "*");response.setHeader("Access-Control-Allow-Headers", "Content-Type, Content-Length, Authori 阅读全文
posted @ 2020-06-23 17:46 覃上 阅读(617) 评论(0) 推荐(0)
摘要:<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script><script src="https://cdn.bootcss.com/jspdf/1.3.4/jspdf.debug.js" 阅读全文
posted @ 2020-06-19 12:46 覃上 阅读(4324) 评论(0) 推荐(0)
摘要:后台java (jdk>=1.8): byte[] bytes = byteArrayOutputStream.toByteArray(); String base64Str = java.util.Base64.getEncoder().encodeToString(bytes);前端: func 阅读全文
posted @ 2020-03-27 00:08 覃上 阅读(2238) 评论(0) 推荐(0)
摘要:window.open()只能打开一次,所以下载多个文件只能下载一个function download(name, href) { var a = document.createElement("a"), //创建a标签 e = document.createEvent("MouseEvents") 阅读全文
posted @ 2020-03-12 09:42 覃上 阅读(4483) 评论(0) 推荐(0)
摘要:默认情况下,jQuery传输数据使用Content-Type: x-www-form-urlencodedand和类似于"foo=bar&baz=moe"的序列,然而AngularJS,传输数据使用Content-Type: application/json和{ "foo": "bar", "baz 阅读全文
posted @ 2020-03-11 17:35 覃上 阅读(341) 评论(0) 推荐(0)
摘要:接口:public String get(HttpServletResponse response) throws Exception { response.addHeader("Access-Control-Allow-Origin","*"); return "hello";} 如果是静态文件h 阅读全文
posted @ 2020-03-10 16:26 覃上 阅读(202) 评论(0) 推荐(0)