Code javascript/jquery before into button PHP

Given the possibility to insert javascript / jquery code in a button like Php, Ajax, link, run. This allows you to perform additional checks before sending