How to submit a data from javascript to server

document.forms[0].submit()