A Sample of uploading image using AJAX in jQuery is shown below :
<div>
Now Let’s start on the code. Here is the <b>HTML</b> page :
</div>
<div>
<pre class="prettyprint"><code><!DOCTYPE html>
<html> <head> <script src="//code.jquery.com/jquery-latest.min.js"></script> <script src=“http://malsup.github.io/jquery.form.js"></script> </head> <body> <form action=“upload.php” method=“POST” id=“uploadform”> <input type=“file” name=“file”/> <input type=“submit” value=“Upload”/><br/><br/> Message : <div id=“onsuccessmsg” style=“border:5px solid #CCC;padding:15px;"></div> </form> </body> </html>
