身份证、手机号码 js验证 //验证手机号码function isPoneAvailable(phone) { var myreg = /^[1][3,4,5,7,8][0-9]{9}$/; if (!myreg.test(phone)) { return false; } else { return true; }}//验证身份证号码functio...
jQuery ztree //下载ztree demo<link rel="stylesheet" href="${request.contextPath}/js/marketing/tree/demo.css"><link rel="stylesheet" href="${request.contextPath}/js/marketing/tree/zTreeStyle.css">&am
ajax常用属性 function excelAppear(){ $.ajax({ url:'', type:'post', async:false, data:{}, cache:true, dataType:'json', beforeSend:function(){ ...
poi导入 //文件导入 public String printExcel() throws Exception { try { //获取路径 String dath = ServletActionContext.getServletContext().getRealPath("/tem"); //获取文件名字...
poi导出 public void exportExcel() throws Exception { String name = "";//创建HSSWordBook对象SXSSFWorkbook hssfWorkbook = new SXSSFWorkbook(100);//创建工作薄Date time = new Date();SimpleDateFormat sdf = new ...
个推消息推送 public class AppPushUtil { private final static org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(AppPushUtil.class); //采用"Java SDK 快速入门", "第二步 获取访问凭证 "中获得的应用配置,用户可以自行替换 p...
将list数据写入到txt中 设置文件名字 String fileName= ""; InputStream is =new FileInputStream(file); String path = request.getSession().getServletContext().getRealPath("/index/开心.txt"); File fil
springmvc文件下载 /*** * 下载 * @return * @throws IOException */ @RequestMapping(value="/downFile.do") public ResponseEntity downFile(HttpServletRequest request,HttpServletResponse resp
测试springmvc方法和配置文件是否有错 public static void main(String[] args) { ApplicationContext ac = new ClassPathXmlApplicationContext("spring*.xml"); uploadController a = ac.getBean("uploadController",uploadControlle
java除法保留小数 m1.put("rate", k1_in ==0 ? "-" : String.format("%.2f", (double)(k1_out - k1_in) * 100 / k1_in));
oracle毫秒转成年月日 select TO_CHAR(t.finish_time/(3600*24)+TO_DATE('1970-01-01 08','YYYY-MM-DD hh24'),'YYYY-MM-DD') from tbl_charge_log t
jsp导出excel /*** * 导出excel表格 * 提交方式只能是同步!! * @param select * @param model * @param session * @return * @throws IOException * @throws WriteException * @throw
异步提交图片 $(function(){ $("#uploading").click(function(){ var $file= $("#pare").val(); if($file.length != 0){ var subscript =