How to post using ajax

Here is the ajax format to post a request without refresh the page. var datastring = {‘name’:name, ’email’:email, ‘phone’:phone }; $.ajax({ url:”register.php”, type:”post”, data: datastring, }) register.php is the target page, where to send post request using ajax.