There are more accurate ways to calculate a quadratic control point, but this close approximation has the benefit of being very quick to calculate:
// calc a control point
var cpX = 2*anywhereOnCurveX -startX/2 -endX/2;
var cpY = 2*anywhereOnCurveY -startY/2 -endY/2;
Here's a live demo which calculates the approximate control point given a starting point, ending point and any point on the curve (any point other than the start/end point):