Readonly对我桌面上的部分输入字段不起作用。 [英] Readonly does not work on part of my inputs fields on my table.

查看:79
本文介绍了Readonly对我桌面上的部分输入字段不起作用。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果未选中复选框,则只读取特定输入。在我的桌子上,如果选中复选框,则第二行不会删除只读。我在代码上做错了什么?



我已将我的代码放在 iDOKin [ ^ ]



你的帮助很合适。



我的尝试:



我尝试在第二行更改id =compitableDevice但没有运气

I make specific inputs readonly if checkbox is not checked. On my table the second row does not remove read-only if checkbox is checked. What I'm doing wrong on my code?

I have put my code on iDOKin[^]

Your help is a approciated.

What I have tried:

I tried to change the id="compitableDevice" on the second row but no luck

推荐答案

ID必须是唯一的,如果您有多个ID,则会出现意外行为比如只识别那个id的第一个元素,这可能是这里发生的。使用数据属性标记来标识元素而不是ID。
IDs have to be unique, if you have multiple ids you get unexpected behaviours such as only the first element with that id being recognised which is what is probably happening here. Use data attribute tags to identify your elements rather than ids.


这篇关于Readonly对我桌面上的部分输入字段不起作用。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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