JavaScript Articles
- Focus! — Login Form Fail (Obsolete) If you’re going to set the initial focus in a form field, don’t use onload(). Chances are you’ll end up moving the cursor while power users are already typing.
- Reverse the Colors when Viewing a Web Page Not as good as a real dark mode, but you can easily reverse the colors on any website you’re viewing, turning light pages dark and dark pages light.
- Select All of a Code Sample Using Minimal JS A short (~10 lines) JavaScript fragment to select an entire code snippet when someone clicks, taps, or presses a key on it.
- The Right Tool… Think about when to use client-side scripting vs. server-side scripting.
- Useful Bookmarklets A collection of bookmarklets that I’ve found useful.
- What’s Dynamic About It? It doesn’t really update that often: maybe 3 or 4 times a month. Is it really worth building that file dynamically?