4 ms·
Semi-related, there's a a useful trick for using Javascript labels as URLs. Way back in the day, I used to write labels like `<a href="javascript:open_save_dia
by lhorie 5y ago
Semi-related, there's a a useful trick for using Javascript labels as URLs.
Way back in the day, I used to write labels like `<a href="javascript:open_save_dialog:;">` instead of `<a href="javascript:void(0)">`. The idea is that both yield undefined to prevent the default URL following semantics of the link, to instead do whatever JS logic is attached to the onclick event, but when the user hovers over the link, the label makes the corner tooltip of the browser show descriptive information to the user about what clicking will do, whereas `void(0)` tells you nothing.