iframe标签实现form表单提交无页面刷新(不需要js)---解析
来源:互联网 发布:网络喷嘴 编辑:程序博客网 时间:2024/05/16 12:54
先看一段代码(PHP例子)
1、表单代码(form.php):
- <?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>
2、action代码(formAction.php):
- <?php
- echo "<script>alert('test....');</script>";
- ?>
OK,上面的代码非常简单,但实现了表单提交无刷新....哪这是为什么呢?
哦~其实很基础的东西......就是form标签的属性问题.....如图:
0 0
- iframe标签实现form表单提交无页面刷新(不需要js)---解析
- iframe标签实现form表单提交无页面刷新(不需要js)---解析
- iframe标签实现form表单提交无页面刷新(不需要js)---解析
- iframe标签实现form表单提交无页面刷新(不需要js)---解析
- 使用iframe实现无刷新表单提交
- 使用iframe实现无刷新提交表单
- iframe标签实现form表单提交(如文件上传下载)不刷新
- iframe 无刷新提交表单
- iframe无刷新提交表单
- 使用jquery.form.js实现form表单无刷新提交简单示例
- 无刷新提交form表单
- Play FrameWork 使用jquery.form.js实现无刷新提交带文件的表单
- 利用iframe实现表单的无刷新提交
- 利用iframe实现表单的无刷新提交
- 简单方法实现Form 无刷新提交表单
- 利用iframe实现提交表单是页面部分刷新
- 使用iframe实现提交表单不刷新页面
- 如何实现提交form表单而不重新刷新页面
- C语言中printf格式化输出函数
- 道路运输车辆卫星定位系统标准符合性检测 ----操作方法与注意事项
- C++输出格式控制
- C#图像颜色域判断以及颜色直方图识别方法
- How many prime numbers 2138
- iframe标签实现form表单提交无页面刷新(不需要js)---解析
- smartctl获取raid卡下intel ssd寿命
- 多态
- CFontDialog对话框
- Decode Ways -- LeetCode
- 中英组合的思维方式探讨
- eclipse之The currrently displayed page contains invalid values错误
- SAP Sybase SQL Anywhere数据库JDBC访问(需要native dll)
- LeetCode刷题笔录 Single Number