Look through the data and get the result: no
But at the same time also found a solution, is to use the way to the IFRAME to submit the form, that is, the implementation of no refresh submission form can upload files!
One, HTML code
Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title> No refresh submission Form </title>
<script type= "Text/javascript" >
<!--
function Callback (str) {
alert (str);
}
--></script>
<body>
<form name= "Form1" method= "POST" action= ". /post.php "target=" Post_frame "enctype=" Multipart/form-data ">
<iframe name= ' post_frame ' id= post_frame "style=" Display:none; "mce_style=" Display:none; " ></iframe>
<input type= "file" Name= "img"/>
<input name= "power[]" type= "text"/>
<input type= "Submit" value= "complete the above modification" name= "Submit"/>
</form>
</body>
Second, PHP code (processing code)
The code here would like how to write how to write, but the execution of this in the HMTL page should be a performance, this time to use the last page of the function callback ()
Copy Code code as follows:
Echo ("<script type=\" text/javascript\) >parent.callback (' Operation successful! ') </script> ");