当我按下刷新按钮时,为什么我的表单会提交 [英] why does my form submit when i press the refresh button

查看:74
本文介绍了当我按下刷新按钮时,为什么我的表单会提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我按下我的网络表单上的刷新按钮,它会提交表单并添加默认值或数据库中的任何值。任何人都可以帮我解决这个问题

If I press the refresh button on my web form it submits the form and add the default values or whatever values that were there to the database.could anyone help me by giving me some sort of solution to this problem

推荐答案

只有在用户按下返回或选择提交按钮时才会提交。


但是,如果这样,对于某些(奇怪的)原因,不是这样,你可以用PHP来对付它。


我相信你可以使用JavaScript,但我不知道如何你会这样做...


假设你提交到同一页面:
It should only submit if the user has pressed return or selected the ''submit'' button.

But, if this, for some (strange) reason, isn''t the case, you can counter it with PHP.

I''m sure you could with JavaScript but i''m not sure how you would do that...

assuming you''re submitting to the same page:
展开 | 选择 | Wrap | 行号


叹息......如果你需要帮助,你真的应该帮助我们帮助你!


一段代码,甚至是更好的解释帮助我们帮助你。
Sigh... if you want help, you really should HELP US to help you!

A snippet of code, or even a better explanation would go a long way in helping us to help you.


你可以通过vb代码中的属性限制(如果page.ispostback = true)
you can restrict by a property (if page.ispostback=true) in vb code


这篇关于当我按下刷新按钮时,为什么我的表单会提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆