Openstreetmap API: Latitude/Longitude

In the end, I need Latitude/Longitude coordinates. On a webpage, I need a zoomable map, preferably with a cross in the center, and an OK button. The user moves and zooms the map, and then clicks the OK button, which gives the page (JavaScript) the lat-long coordinates of the current center of the map.

Also, a type-in field on the map would be nice, so the user can get to the area more easily.

Could someone please point me to the right direction? I’m completely new to this field.

Openstreetmap is preferred, but Google Maps can be arranged, if necessary.

Thank you in advance.