i have html form like this.
<form
action="xyxz/reguser.asp" method="post" enctype="multipart/form-data">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Submit">
</form>
I like to use Action , method and enctype in $.ajax method instead of using it in html form.
Action = url , method = get/post
How to specify enctype in $.ajax ?
is that enctype = contentype ?
$.ajax({ type: "post", url: "xyxz/reguser.asp", data: postData, contentType: "
multipart/form-data",
success: function(responseData, textStatus, jqXHR) { alert("data saved") }, error: function(jqXHR, textStatus, errorThrown) { console.log(errorThrown); } })