You left this really open. Yes, it is possible.
Your language makes it look like you are a web dev, but perhaps not a sharepoint dev. So the things I found the most helpful when I was in that position:
- you can upload .js files to a document library and run them with script tags.
- Web parts like content editor allow you to edit html directly (though it gets reformatted every time you close and not everything is valid) embedding script tags is trivial once you have that mastered
- In the list/library tab in the ribbon The Customize list section has a Form Web Parts drop down where you could add a web part to the New, read, and edit forms
- js can make all sorts of interesting web service calls to SP through SOAP or REST.
- SP uses lots and lots of js, so it is worth having a look at your page to see what all is already loaded, you probably already have everything you need. (jquery is super common, so if you need it $ may already be customized)