使用iframe实现无刷新提交表单
2015-07-08 15:34
537 查看
<?php
header("Content-type: text/html; charset=utf8");
?>
<iframe name="testIframeName" style="display:none;"></iframe>
<form target="testIframeName" method="post" action="formAction.php">
<input type="text" name="username"/>
<input type="password" name="password"/>
<input type="submit" value=" 提 交 " />
</form>
<?php
$user=$_POST['username'];
$pass=$_POST['password'];
if($user=='an'&&$pass=='123')
echo "<script>alert(登录成功....');</script>";
?>
header("Content-type: text/html; charset=utf8");
?>
<iframe name="testIframeName" style="display:none;"></iframe>
<form target="testIframeName" method="post" action="formAction.php">
<input type="text" name="username"/>
<input type="password" name="password"/>
<input type="submit" value=" 提 交 " />
</form>
<?php
$user=$_POST['username'];
$pass=$_POST['password'];
if($user=='an'&&$pass=='123')
echo "<script>alert(登录成功....');</script>";
?>
相关文章推荐
- iOS MultipeerConnectivity 编程发送图片服务器端
- xutils-httpUtils 下载显示文字进度百分比(toast)
- Go home or stand up
- 学习easyui疑问(二)
- poj 1532 【求无向图的所有割点 以及 该点分成的BCC数目】
- 带二维码的通讯录
- Android控件的一些属性
- _ _type_traits
- Android学习笔记(1)--系统特点&框架
- 简述UIImagePickerController的属性和用法
- Cantor 的数表
- 会话Cookie及session的关系(Cookie & Session)
- HTTPS 是如何保证安全的?[转帖]
- 在Ubuntu 14.04 LTS系统中设置Apache虚拟主机
- unity鼠标拖动三维物体
- ArrayList线程不安全详解
- 详细探究Spark的shuffle实现
- 堆和栈的区别(转过无数次的文章)
- 简述UIDatePicker的用法
- C++ 开源库