随笔分类 - 常用的一些方法和工具类
摘要:public DbDriver(){ //读取WEB-INF的路径 try{ /*String path=this.getClass().getResource("/").getPath()+"config.properties"; path=path.substring(0,path.indexOf("classes")-1)+"/dbConfig.properties";*/ String path=DbDriver.class.getResource("/").getPath(); Str
阅读全文
摘要:<tr> <td>Partner Name</td> <td><form:input path="name" id="name" maxLength="30" onkeyup="value=value.replace(/\s/g,'')"/><SPAN style="color: #FF0000"> *</SPAN></td> </tr>
阅读全文
摘要://2012/03/12,added by king public static void setTime(){ /* SimpleDateFormat sdf = new SimpleDateFormat("HHmmss", Locale.CHINA); Date m_date = new Date(); Calendar c = Calendar.getInstance(); c.setTime(m_date); long lMill = c.getTimeInMillis(); c.setTimeInMillis(lMill); System.out.println(
阅读全文
摘要:import org.joda.time.DateTime;import java.util.Date;public void setCreatedDate(Date createdDate) {this.createdDate = createdDate;}public void setCreatedDate(final DateTime createdDate) {this.createdDate = null == createdDate ? null : createdDate.toDate();}public DateTime getLastModifiedDate() {retur
阅读全文
摘要:在Constants.java中:public static HashMap<String, String> getPhotoTypeMap() {HashMap<String, String> resultMap = new HashMap<String, String>();resultMap.put("jpg", "");resultMap.put("png", "");return resultMap;}@RequestMapping(value = "/upl
阅读全文
摘要:e.keycode详解function submitLoginForm(e) {e = window.event || e;if(e.keyCode == 13) {login();}}keycode 8 = BackSpace BackSpacekeycode 9 = Tab Tabkeycode 12 = Clearkeycode 13 = Enterkeycode 16 = Shift_Lkeycode 17 = Control_Lkeycode 18 = Alt_Lkeycode 19 = Pausekeycode 20 = Caps_Lockkeycode 27 = Escape E
阅读全文
浙公网安备 33010602011771号