2012-04-19 71 views

回答

0

我最終改變了它的客戶端。

   $(function() { 
         var capRateLabel = $('lblCapRate').next(); 
         if(capRateLabel) 
         { 
          capRateLabel.text('newtext'); 
         } 
       }) 
2

我不知道我是否理解你的問題。但一個RadioButton有一個Text屬性。

RadioButton1.Text = "anytext"; 

編輯:如果你不是想改變單選按鈕控件的標籤,你可以(從複選框inherited)使用LabelAttributes屬性。

例如:

RadioButton1.LabelAttributes.Add("onmouseover", "this.style.backgroundColor = 'red'"); 

RadioButton1.LabelAttributes.CssStyle.Add("text-decoration", "line-through"); 
+0

+1專打我一拳。 – 2012-04-19 21:19:50

+2

如果這就是答案......我會打我自己。 – 2012-04-19 21:22:41

2

只需通過Text屬性:

MyRadioButton.Text = "My Radio Button"; 
1

這取決於你想改變標籤的內容。您可以使用LabelAtttributes添加或刪除屬性,Text屬性來更改文本等,但這就是它。

如果您需要更多,我會考慮建立自己的RadioButton控制;它確實不會那麼困難,它會給你任何你需要的靈活性。