我如何使文本字段只读在Grails中? [英] how can i make a textfield read only in grails?

查看:88
本文介绍了我如何使文本字段只读在Grails中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我试着在textfield中使用readonly属性,如下所示,但它不起作用。

 < g:textField name =fnamesize =14pxid =fnamevalue =$ {patient.fname}readonly =真> 


解决方案

它不允许只读,尝试disabled =true


how can i make a textfield read only in grails.

I tried with readonly attribute on textfield as below but its not working.

<g:textField name="fname" size="14px"  id="fname" value="${patient.fname}" readonly="true">

解决方案

It does not allows readonly, try disabled="true"

这篇关于我如何使文本字段只读在Grails中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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