<!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>無刷新提交表單</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_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="完成以上修改" name="submit" />
</form>
</body>
</html>
二、PHP代碼(處理代碼)
這里的代碼就想怎么寫怎么寫了,不過這個里執行完了剛才那個HMTL頁面應該要有所表現,這時就要用到上個頁面中的 function callback()了
代碼如下:
echo ("<script type=\"text/javascript\">parent.callback('操作成功 ! ')</ script>");
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com