Can I use hook form alter to add an attribute to a webform field?
You have to do something like this:

function addonchange_form_alter(&amp;$form, &amp;$form_state, $form_id){
  // target a single form
  if($form_id == "webform_client_form_22"){
    $form['submitted']['company']['#attributes']['onchange'] = 'changevalue';
  }
}