The screws we have linked to are long enough to go through the battery mounting plate and into the bike frame but if you intend to fit another accessory (e.g. water bottle) on the underside of the frame using the same fixing holes then you will need to get longer screws.
The length of the longer screws will depend what it is that you are fitting to the underside of the frame - Most likely "M5 x 30mm" will be fine for most situations.
Here is a link to the correct locking nuts & washers that will not rust or vibrate loose:
UK:
https://www.toolstation.com/stainless-steel-nylon-nut/p73081
https://www.toolstation.com/stainless-steel-washer/p79167
USA: