Newbie: getting the value of an input box

Newbie: getting the value of an input box

I would like to check the value in an input box and if the value has changed, then perform the action.  Being a newbie at Jquery, I am not sure about the syntax.

var timeout = undefined;
var str = '';  /* Get the initial value and if changed, do something */
$('#input_box').live('keyup', function() {
    if(timeout != undefined) {
      clearTimeout(timeout);
    }
    var timeout = setTimeout(function() {
      timeout = undefined;
      /* Do something */
      $('#log').append('<div>Handler for input_box .keyup() called.</div>');
    }, 1500);
});

Many thanks for your help...

Todd