关于在asp vbscript的两个输入文本框 [英] about two input text box at asp vbscript

查看:144
本文介绍了关于在asp vbscript的两个输入文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的代码:


I have code like this:


<input type="text" name="tradename" size="40" maxlength="40" value=<%=rs1("tradename")%>/>    <%=rs1("tradename")%>/>




此代码将在文本框中显示一条记录,在框外显示其他记录,结果相同

当数据库中的记录为空时,该记录将不会显示

我的问题是?如果记录为空,则文本框也将不可见.




this code will display one record in text box and other outside the box having same results

when record in database is empty then the record will not display

my question is ? if record is empty then textbox will also become invisible.

推荐答案

亲爱的朋友,

你可以去.

<%,如果rs1("tradename")<>"则为%>

< input type ="text" name ="tradename" size ="40" maxlength ="40" value =<%= rs1("tradename")%>/>

<%其他%>

找不到记录

<%如果%>
Dear Friend,

You can go this.

<% if rs1("tradename")<>"" then %>

<input type="text" name="tradename" size="40" maxlength="40" value=<%=rs1("tradename")%>/>

<% Else %>

No Records Found

<% End if %>


hello,
结束
使用isNull()函数,例如

hello,

Use the isNull() function, for instance

<% if Not IsNull(rs1("tradename")) then %>
            <input type="text" name="tradename" size="40" maxlength="40" value=<%=rs1("tradename")%>/>    <%=rs1("tradename")%>/>
         <% end if %>


这篇关于关于在asp vbscript的两个输入文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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