加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

表单提交 – 不提交已禁用输入的值?

发布时间:2020-12-14 21:26:25 所属栏目:资源 来源:网络整理
导读:这是我在firefox中找到的fireBug。 在其他浏览器中是否相同? 如果是这样,原因是什么? 解决方法 是的,所有浏览器都不应该提交禁用的输入,因为它们是只读的。 More info(第17.12.1节) Attribute definitions disabled [CI] When set for a form control,t
这是我在firefox中找到的fireBug。

在其他浏览器中是否相同?

如果是这样,原因是什么?

解决方法

是的,所有浏览器都不应该提交禁用的输入,因为它们是只读的。

More info(第17.12.1节)

Attribute definitions

disabled [CI] When set for a form control,this boolean attribute
disables the control for user input. When set,the disabled attribute
has the following effects on an element:

  • Disabled controls do not receive focus.
  • Disabled controls are skipped in tabbing navigation.
  • Disabled controls cannot be successful.

The following elements support the disabled attribute: BUTTON,INPUT,
OPTGROUP,OPTION,SELECT,and TEXTAREA.

This attribute is inherited but local declarations override the
inherited value.

How disabled elements are rendered depends on the user agent. For
example,some user agents “gray out” disabled menu items,button
labels,etc.

In this example,the INPUT element is disabled. Therefore,it cannot
receive user input nor will its value be submitted with the form.

06000

Note. The only way to modify dynamically the value of the disabled attribute is through a script.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读