摘要: js合成url时,如果参数是中文,传到struts2中会乱码。解决办法如下: 1.js文件中使用encodeURI()方法(必须套两层)。 name= encodeURI(encodeURI(name)); 2.action中URLDecoder解码 name = java.net.URLDecoder.decode(name,"UTF-8"... 阅读全文
posted @ 2015-11-12 14:39 IAMME 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 1:jQuery插件支持的转换方式 $.parseJSON( jsonstr ); jQuery.parseJSON(jsonstr);//可以将json字符串转换成json对象 2:浏览器支持的转换方式(Firefox,chrome,opera,safari,ie9,ie8)等浏览器 JSON.parse(jsonstr); //可以将json字符串转... 阅读全文
posted @ 2015-11-12 14:38 IAMME 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 1.对对应的事件添加长度判断即可;如:(onkeyup="this.value = this.value.slice(0, 500)")(调试结果成功) 2.重新jquery maxlength(调试结果无效) 阅读全文
posted @ 2015-11-12 14:37 IAMME 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 第一种: select * from portal_module m where m.moduleid like '%' connect by prior m.moduleid = m.parentid start with m.moduleid like 'ecp' order by m.viewOrder 第二种: select * from portal_mo... 阅读全文
posted @ 2015-11-12 14:36 IAMME 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-11-12 14:35 IAMME 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 第一种写法:$("#myFormId").attr("action", url); 第二张写法:$("#myFormId").action=url; 【注意】:第二种写法存在问题:如果A页面以window.open()方式进入B页面,然后B页面的form表单请求action会失效。 阅读全文
posted @ 2015-11-12 14:33 IAMME 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 参考:http://blog.csdn.net/struts2/article/details/1807166 quartz使用主要有三个部分,一个调度器Scheduler,一个要被调度的任务jobDetail,一个触发器Trigger. 1.配置一个job,这个job就是我们要调度的任务类。 2. 阅读全文
posted @ 2015-11-12 14:31 IAMME 阅读(146) 评论(0) 推荐(0) 编辑
摘要: /** •Reallocates an array with a new size, and copies the contents •of the old array to the new array. •@param oldArray the old array, to be reallocated. •@param newSize the new array size. •@return ... 阅读全文
posted @ 2015-11-12 14:29 IAMME 阅读(3189) 评论(0) 推荐(0) 编辑
摘要: 在用jxl 这个包读取excel的单元格的内容的时候,用如下语句: String text = cell.getContents(); 如果是数字,只能得到3位小数,超过的部分,会四舍五入。 解决的办法就是: 1. 把单元格的格式设置为数字,并留出足够长的小数位。 2. 第一种方法虽然有效,但是显得麻烦,可以通过下面方法得到正确的数字: if(ce... 阅读全文
posted @ 2015-11-12 14:28 IAMME 阅读(427) 评论(0) 推荐(0) 编辑
摘要: Oracle 内置函数Translate找出非数字字符的记录 select trim(translate(RTRIM), '#0123456789', '#')) from dr_economicorg t Where trim(translate(RTRIM), '#0123456789', '#')) is not null; oracle 拼接字符串 wm_conc... 阅读全文
posted @ 2015-11-12 14:24 IAMME 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 获取数据方法一: $('#countUnit').combobox({ data:com_countUnit, editable:false, cache: false, panelHeight: 'auto', valueField:'id', textField:'text', multiple:true //多选 multiple:false单选 }).combobox(... 阅读全文
posted @ 2015-11-12 14:21 IAMME 阅读(174) 评论(0) 推荐(0) 编辑
摘要: /** * 乱码出现的原因 ie采用URLEncoder编码输出中文 opera采用filename safari采用iso-8859-1 * chrome采用base64或iso-8859-1 firefox采用base64或iso-8859-1 */ public static String downToUtf8String(String s) thro... 阅读全文
posted @ 2015-11-12 14:18 IAMME 阅读(279) 评论(0) 推荐(0) 编辑