select(element) -> HTMLElement

Selects the current text in a text input.


Some search boxes are set up so that they auto-select their content when they receive focus.

$('searchbox').onfocus = function() {
  // You can also rely on the native method, but this will NOT return the element!

Focusing + selecting: use activate!

The activate method is a nifty way to both focus a form field and select its current text, all in one portable JavaScript call.