首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

请问一个在后台设置input type="text"的class的有关问题

2012-09-15 
请教一个在后台设置input typetext的class的问题样式表:C# code.imgbutton{background: url(images/wxz

请教一个在后台设置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

热点排行