Form 提交表 單頁面刷新不跳轉


1.提交form,action 提交數據,但頁面不跳轉,可以使用Iframe簡單方法

<!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>Form提交表單頁面不跳轉</title>
</head>
<body>
<form action="hello.php"method="post"target="id_iframe">
<input type="text"id="input_text"name="input_text"/>
<input type="submit"id="sobmit"name="submit"value="提交"/>
</form>
<iframe id="id_iframe"name="id_iframe"style=""></iframe><!--hello.php頁面返回的數據 顯示在iframe 中->
</body>
</html>

2.注意1 <form action="hello.php"method="post"target="id_iframe"></from>中的target 一定是你要指定要顯示返回結果的 <iframe id="id_iframe"name="id_iframe"style=""></iframe> 標簽中的name屬性

3.注意2 <iframe id="id_iframe"name="id_iframe"style=""></iframe> 可以放到body中的任何位置 特別注意可以放到 <form action="hello.php"method="post"target="id_iframe"></from> 中

全文:http://www.thinksaas.cn/group/topic/346666/

怎么實現php表單提交后不跳轉 http://zhidao.baidu.com/question/164772500.html

php表單提交成功后如何跳轉到指定頁面?http://zhidao.baidu.com/link?url=-FaxpeIpyWsf2KMd30PwsAkwgYPiTHZqvSZvt3RfmHYIVLik_NCpoU1HxSHQXK-LX43cy3WJSr6oq-muZtcfExZ_I6EhenPGME7U-KNRD4y


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM