从后面的代码启用/禁用html输入对象 [英] enable/disable html input object from code behind

查看:92
本文介绍了从后面的代码启用/禁用html输入对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我有一个用于客户端验证的输入单选按钮

hi there i have got a input radio button with i use for client side validation

<input type="radio" id="rdoStoDel" name="options" value="Store"  önchange="setShemp(false)" />



但是我有一个条件root我要显示控件rdoStoDel但是它是 enable = false 或只有就绪模式我想从后面的代码设置这一个是否有一种方式我可以设置这欣赏你所有的帮助


but i got one condition root where i want to display the control rdoStoDel but it his be enable=false or ready only mode i want to set this one from the code behind is there a way i can set this appreciate all your help

推荐答案

如果你想从服务器端脚本访问任何控件,这需要服务器端控制。



通过在其声明中添加runat = server来使您的单选按钮服务器控制,然后您可以从服务器访问它以及来自客户端脚本。



希望这有助于你
If you want to access any control from server side scripting, this needs to be server side control.

Make your radio button server control by adding runat=server to its declaration and then you can access it from server as well as from client scripting.

Hope this help you


这篇关于从后面的代码启用/禁用html输入对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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