Code for making the comment field required on checkout page in magento 1
Note : put this code in skin/frontend/default/your_theme/js/ your_theme /opc/checkout.js
Code for making a confirm email field in Magento 1
In billing.phtml -> paste below code in billing.phtml at just below at already had email field. Then open validation.js which is located at js/prototype/validation.jsand paste below code at just below the line => return !(pass.length < 7)
Code for override js in magento 1
Create file in skin/frontend/default/your_theme-> create here (extendedjs.js) and change your code as per requirementValidation.add() then apply it to local.xml -> override your handler (for knowing that which you have to override you should inspect element where you want to apply the js page then see the body element then you can got at there.)