Q:

Textarea: can it detect the loss of focus

In HTML or Javascript is it possible to detect when a textarea looses focus?  
I have a text area & on loosing focus I want to read the data in a textarea & check if its valid. 
Maybe...
<textarea onloosefocus="myFunct();">
</textarea>

// or
var isTyping = false;

function onKeyUp( event )
{
   setTimeout( function()
   {
      isTyping = false;
   }, 100);

   setTimeout( function()
   {
      if (! isTyping)
         validateTextArea();
   }, 500);
}

function onKeyDown( event )
{
   isTyping = true;
}

<textarea onkeydown="onKeyDown(e);" onkeyup="onKeyUp(e);">
</textarea>

A:

The event you are looking for is the blur event, available through the onblur attribute:
<textarea onblur="myFunct();"></textarea>

However, it's much better if you attach events properly, e.g. through jQuery:
$('#id_of_your_textarea').on('blur', function(e) {
    // your code here
});

A:

You can also use the onblur attribute for the textarea if you don't have access to jquery

