Search the data to get the result: No
However, we also found a solution, that is, using iframe to submit the form, that is, you can upload files without refreshing the new form!
I. HTML code
Copy codeThe Code is as follows: <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> no need to submit a new form </title>
<Script type = "text/javascript">
<! --
Function callback (str ){
Alert (str );
}
// --> </Script>
</Head>
<Body>
<Form name = "form1" method = "POST" action = ".../post. php" target = "post_frame" enctype = "multipart/form-data">
<Iframe name = 'Post _ framework' 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 preceding modification" name = "submit"/>
</Form>
</Body>
</Html>
Ii. PHP code (Processing code)
The code here is just how to write it, but the execution of the HMTL page just now should have a certain performance, then the function callback () in the previous page will be used.Copy codeThe Code is as follows: echo ("<script type = \" text/javascript \ "> parent. callback ('operation successful! ') </Script> ");