开发者

remove checked attribute from htmlgenericcontrol

I'm using jquery plugin which need list items to be like:

<input name="star3" type="radio" class="star" checked="checked"/>

I added runat="server" to that. Is there a way to remove on codebehind checked attribute (not change it, just remove it). It is now htmlGenericControl as I suppose.开发者_运维技巧

thanks for help


Try this

$("input:radio[name='star3']").attr("checked", false);

OR

$("input:radio[name='star3']").remoevAttr("checked");


You can do

htmlGenericControl1.Attributes.Remove("checked") 

or if the server control has an id like this

<input name="star3" type="radio" class="star" checked="checked" 
                                runat="server" id="radio1"/>

you can do

radio1.Attributes.Remove("checked");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜