Solution 1 Listen to mousedown instead of click. The mousedown and blur events occur one after another when you press the mouse button, but click only occurs when you release it. Solution 2 You can preventDefault() in mousedown to block the dropdown from stealing focus. The slight advantage is that the value will be selected when the mouse button is released, which is how native select components work. JSFiddle… Read More


1)Descendant selectors http://css.maxdesign.com.au/selectutorial/selectors_descendant.htm 2)You can also specify that only specific HTML elements should be affected by a class. In the example below, only “p” elements with class=”center” will be center-aligned: Example p.center { text-align: center; color: red; } 3)group selectors To group selectors, separate each selector with a comma. In the example below we have… Read More


表單驗證應用示範五 驗證 “正規表示式” 敘述是否正確 … 請輸入正規表示式敘述 請輸入要驗證的字串… Read More