2014年2月15日
摘要: 一.web.xml1.ContextLoaderListener职责:加载顶层 WebApplicationContext.WebApplicationContext主要用于提供应用所使用的所有中间层服务,包括数据源,DAO,Service,都在其中注册。默认配置文件--/WEB-INF/applicationContex.xml当需要多个配置文件时,可以通过contextConfigLocation的配置参数来设置。(可以参考org.springframework.web.context.ContextLoader类的javadoc来进行param-value值的设置) ... 阅读全文
posted @ 2014-02-15 21:13 org_zyx 阅读(332) 评论(0) 推荐(0) 编辑
  2014年1月9日
摘要: public List randomSelect(String ajxhs, int n) { String[] ajxhStrings = StringUtil.split(ajxhs, ','); int total = ajxhStrings.length; List chooseAjxhs = new ArrayList(); String randomajxhs = ""; Random rd = new Random(); int choseNum = 0; if (total >... 阅读全文
posted @ 2014-01-09 10:02 org_zyx 阅读(192) 评论(0) 推荐(0) 编辑
  2013年10月10日
摘要: 可编辑下拉框,思路:一个input,一个select,位置重叠,input在上,宽度微调到如下效果:问题:ie6下select的层级高bug.解决办法:添加个空的iframe,用iframe遮住select,再用input遮住iframe。另外ie6下select无法用css设置高度,需微调下其余控件高度以达到一致。html: js: var opt = document.getElementById("optItem"); var txt = document.getElementByI... 阅读全文
posted @ 2013-10-10 09:31 org_zyx 阅读(284) 评论(0) 推荐(0) 编辑
  2013年9月4日
摘要: 一直用jQuery库,如果不用,还会使用Ajax吗?参考书:1.PHP与jQuery开发实例;2.Ajax基础教程 (图灵程序设计丛书就是好)把书1里jQuery代码换成原生JS,实例1是选择省份出现城市列表,实例2改成了联动下拉框。一、实例1html代码: 省份: js代码: var xmlHttp; function createXMLHttpRequest() { if (window.ActiveXObject) { ... 阅读全文
posted @ 2013-09-04 20:12 org_zyx 阅读(379) 评论(0) 推荐(1) 编辑