读书人

请问一个在后台设置input type=quot;textquot;

发布时间: 2012-09-15 19:09:28 作者: rapoo

请教一个在后台设置input type="text"的class的问题
样式表:

C# code
.imgbutton{    background: url(images/wxzw.jpg);    border-style: none;    width: 16px;    height: 15px;    background-repeat: no-repeat;    cursor: pointer;    font-size: 1px;    text-decoration: none;}.imgbutton2{    background: url(images/xzzw.jpg);    border-style: none;    width: 16px;    height: 15px;    background-repeat: no-repeat;    cursor: pointer;    font-size: 1px;    text-decoration: none;}

前台:
C# code
<input type="text" id="t1p1z11" name="t1p1z11" class="imgbutton" value="0" readonly="readonly">

我要如何在后台设置或者说改变这个input type="text"的class?

[解决办法]
C# code
<input type="text" id="t1p1z11" name="t1p1z11" class="imgbutton" value="0" readonly="readonly" runat="server">t1p1z11.Attributes["class"] = "imgbutton2";
[解决办法]
= =楼主真坏。。用了我的建议一分没给我 5555

读书人网 >asp.net

热点推荐