禁用表单中的字段输入类型 [英] Disable field input type in the form

查看:61
本文介绍了禁用表单中的字段输入类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。


我有三个字段的表格:

Hi there.

I have this form with three fields:

展开 | 选择 | 换行 | 行号

推荐答案

添加 Stato 的函数 onchange 。在该函数中,如果 Stato 的值为 Assente ,则禁用您需要禁用的所有内容,如果值不是 Assente ,则启用它们返回。


您可能无法禁用该链接,因此请将其href设置为 javascript :void(0) "相反。
Add a function onchange of Stato. In that function, if value of Stato is Assente, disable all the thing you require to disable, and if value is not Assente, enable them back.

You may not disable the link, so set its href to "#" or "javascript:void(0)" instead.


谢谢,但是一个例子?


展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号


这篇关于禁用表单中的字段输入类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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