当前位置:网站首页>form 表单提交后,使页面不跳转[通俗易懂]
form 表单提交后,使页面不跳转[通俗易懂]
2022-07-31 15:37:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
- form 表单提交数据,往往会刷新页面,数据提交后会跳转到其他页面
- 如果不需要刷新页面时,可以通过ifame实现无刷新。 在form表单下定义一个
ifame将 form 的target属性指向 iframe 的name属性,这样就实现了不刷新页面的form提交。
示例:
<form action="url" enctype="multipart/form-data" target="frameName">
<input type="file">上传文件
<button>提交</button>
</form>
<iframe src="" frameborder="0" name="frameName"></iframe>数据提交后,页面不会刷新跳转。对iframe,设置需要的样式,即可。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/127976.html原文链接:https://javaforall.cn
边栏推荐
- Public Key Retrieval is not allowed error solution when DBeaver connects to MySQL 8.x
- .NET 20周年专访 - 张善友:.NET 技术是如何赋能并改变世界的
- WPF项目--控件入门基础用法,必知必会XAML
- ansible学习笔记02
- 11 pinia使用
- 修改SQL语言实现Mysql 多表关联查询优化
- Bilateral filtering acceleration "recommended collection"
- 三、数组
- RecyclerView高效使用第三节
- How useful is four-quadrant time management?
猜你喜欢

01 邂逅typescript,环境搭建

TRACE32——常用操作

Why is the field of hacking almost filled with boys?

Synchronized和volatile 面试简单汇总

How useful is four-quadrant time management?

t-sne 数据可视化网络中的部分参数+

After Grafana is installed, the web opens and reports an error

Kubernetes principle analysis and practical application manual, too complete
![[Meetup Preview] OpenMLDB+OneFlow: Link feature engineering to model training to accelerate machine learning model development](/img/f6/311d5a4c70993df6291250d2025d3f.jpg)
[Meetup Preview] OpenMLDB+OneFlow: Link feature engineering to model training to accelerate machine learning model development

为什么黑客领域几乎一片男生?
随机推荐
Linux check redis version (check mongodb version)
RecyclerView高效使用第三节
Codeforces Round #796 (Div. 2)(A-D)
01 Encounter typescript, build environment
json到底是什么(c# json)
Public Key Retrieval is not allowed error solution when DBeaver connects to MySQL 8.x
ansible study notes 02
MySQL基础篇【单行函数】
update data table update
Visualize GraphQL schemas with GraphiQL
定时器的类型
全新宝马3系上市,安全、舒适一个不落
What is the difference between BI software in the domestic market?
TRACE32 - C source code association
radiobutton的使用
ML.NET related resources
mongo enters error
TRACE32——C源码关联
Delete the disk in good condition (recovery partition)
苹果官网样式调整 结账时产品图片“巨大化”