Recent Posts

never fake a <input type=file>

less than 1 minute read

不管这篇 自定义input type=”file”的样式以及引出的相关技术问题 描绘得有多么好,永远不要妄想用 <span> 来代替 <input type="file"> (即自定义样式的 file 控件),浏览器兼容性问题 is watching you! 我们可是连 IE6 都要测的...

struts2: interceptor config

less than 1 minute read

为了解决昨天晚上碰到的 aLock 那个吞 Exception 的问题,下午配了一下 struts 2 的拦截器。

Java: shallow copy v.s. deep clone

less than 1 minute read

class Field implements Cloneable { public String name; @Override protected Object clone() { Field f; try { f = (Field) super.clone(...

阻止 form submit 的方法

less than 1 minute read

有两个地方可以可以阻止 form submit,一是 <form onsubmit=""> ,二是 <form> 下的 <input type="submit" onclick=""> ,只要这两个函数有一个是 return false;,那么点击这个 button 并不会 s...