且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何禁用和启用输入类型?

更新时间:2022-10-29 18:50:15

使用JavaScript,您将使用disabled属性。但是,如果您要在页面加载ASP时设置它,只需将其包含在标记内:
展开 | 选择 | Wrap | 行号


嗨..

u可直接在页面中使用

喜欢

[HTML]< input type =''control- text /按钮等''name =''''id =''''<%如果rs(" field")= 1则%>

disabled = true<%elseif re( " field")= 2 then%> disabled = false<%end if if>> [/ HTML]


hi

我想要在...中使用它sp与vbscripts

我需要的是如果选择的选项是floopy和cd然后目的输入字段是启用(显示)ohterwiese目的输入字段是(隐藏)

谢谢

Hi
its urgent
how can enable and desable the input field with condition like
if rs("field")=1 then
desable
elseif re("field")=2 then
enable
end if
and that after chek if the input type is enable then manadatory field can''t null
thanks

With JavaScript, you''d use the disabled property. However, if you''re going to set it whilst the page is loading with ASP, just include it within the tag:
Expand|Select|Wrap|Line Numbers


Hi..
u can used directly in page
like
[HTML]<input type=''control- text/button etc'' name='''' id='''' <%if rs("field")=1 then%>
disabled=true <%elseif re("field")=2 then%>disabled=false<%end if%>>[/HTML]


hi
I wants to use it in asp with vbscripts
and my need is to if selected option is floopy and cd then purpose Input filed is enable(show) ohterwiese purpose input field is(hide)
Thanks