Is it possible to add java script to webform?
An approach is to use hook_form_alter to alter the webform form and attach the custom JS.

/**
 * Implements hook_form_alter().
 */
function custommodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {

  if ($form_id == 'webformCustomID')) {

    $form['#attached']['js'][] = drupal_get_path('module', 'custommodule') . '/custom.js';
  }
}


More info:


https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_alter/7
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_FORM_ID_alter/7
Adding CSS and JS to form with attachments