当数据库字段为空/空时,相应的标签/文本框应变为可见false [英] when database field is null/empty then corresponding label/textbox should become visible false

查看:45
本文介绍了当数据库字段为空/空时,相应的标签/文本框应变为可见false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在首页上开发了一个网页,并在MS acess中使用了javascript和vb脚本语言和数据库.

我想在文本控件为空时禁用标签控件,这意味着当数据库字段为NULL/Empty时其标签变为disable


I''have developed a web page in front page and using javascript and vb script language and database in MS acess .

i want to disable the label control when the text control is empty means when database field is NULL/Empty then its label become disable


<b>Plant name :</b> <i><%=rs1("plantname")%></i><br>
<br />

<b>Trade name :</b>  <%=rs1("tradename")%><br>





这是我的代码,当数据库记录字段(植物名称)为空/空时,我想禁用网页中的植物名称.





this is my code and i want to disable the Plant name in web page when database record field (plantname) is null/empty

推荐答案

if(document.getElementById('textbox1').value='')
{
document.getElementById('label1').enabled=false;
}


这篇关于当数据库字段为空/空时,相应的标签/文本框应变为可见false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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