You can create a custom module for that:
- webfv.info
- webfv.module
- webfv.js
Put all these files into a folder called webfv.
This is the webfv.module file:
<?php
function webfv_form_comment_form_alter(&$form, &$form_state, $form_id) {
if ($form['#id'] == 'webform-client-form-80') {
$form['#attached']['js'][] = array(
'data' => drupal_get_path('module', 'webfv') . 'webfv.js',
'type' => 'file',
);
}
}
And this is the webfv.js file:
(function($) {
$(document).ready(function() {
// Put your code here. //
});
}) (jQuery);
And of course, you should have a webfv.info file:
name = webfv
description = JavaScript Webform Validation
core = 7.x
files[] = webfv.module
Note: this is just one way of doing it, there are some other ways.