有没有办法让我< input>字段不可编辑 [英] Is there a way for me to make an <input> field non-editable

查看:83
本文介绍了有没有办法让我< input>字段不可编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些字段是当前输入字段。有些应该允许编辑而其他人不应该。没有改变他们从输入字段,是否有一个简单的方法来使它,所以我不能编辑这些?如果存在,我正在寻找一个CSS或其他类型的财产。



谢谢

Mariko

解决方案

您可以添加 readonly =只读属性到输入元素。

I have some fields that are currently input fields. Some should allow edits and others not. Without changing them from input fields, is there a simple way to make it so I cannot edit these? I'm looking for just one CSS or other kind of property if that exists.

thanks

Mariko

解决方案

You can add the readonly="readonly" attribute to the input elements.

这篇关于有没有办法让我< input>字段不可编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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