Getting relative form actions with javascript

The other day I needed to get data from a form and manipulate the "get" manually through javascript. For that to happen I needed to obtain the action attribute of the form. The action of this specific form had to be a relative url. What I found through…