摘要:
JSP页面真实姓名 *JSP页面AJAX方法ACTION中方法:/** * 查看真实姓名是否重复 * * @return */ public String IsExsitDLUser1() { String str = get("realname").toString().trim(); str = str.replaceAll(" ", ""); System.out.println("IsExsitDLUser1str-->"+str); if(str != "" || !(" 阅读全文
posted @ 2013-07-01 13:31
meimao5211
阅读(169)
评论(0)
推荐(0)
摘要:
JSP页面 用户名 * 真实姓名 * JSP页面上调用AJAX方法action中 方法: public String aaaa(){ int result = 0 ; String name = get("name").toString(); name = name.replaceAll(" ", ""); System.out.println(" ... 阅读全文
posted @ 2013-07-01 13:26
meimao5211
阅读(3399)
评论(0)
推荐(0)
摘要:
JAVA中去掉空格1. String.trim()trim()是去掉首尾空格2.str.replace(" ", ""); 去掉所有空格,包括首尾、中间String str = " hell o ";String str2 = str.replaceAll(" ", "");System.out.println(str2);3.或者replaceAll(" +",""); 去掉所有空格4.str = .replaceAll("\\s*" 阅读全文
posted @ 2013-07-01 10:20
meimao5211
阅读(493)
评论(0)
推荐(0)

浙公网安备 33010602011771号