<!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>無(wú)刷新提交表單</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代碼(處理代碼)
這里的代碼就想怎么寫(xiě)怎么寫(xiě)了,不過(guò)這個(gè)里執(zhí)行完了剛才那個(gè)HMTL頁(yè)面應(yīng)該要有所表現(xiàn),這時(shí)就要用到上個(gè)頁(yè)面中的 function callback()了
代碼如下:
echo ("<script type=\"text/javascript\">parent.callback('操作成功 ! ')</ script>");
聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com