jQuery
$(document).ready(function () {
$('#ButtonRadioValue').click(function () {
var selValue = $('input[name=radio]:checked').val();
});
});
無線
<div id="radio" align="center">
<input type="radio" id="radio1" value="BtnNextCaseClick" name="radio" checked="checked"/><label for="radio1" style="width: 109px; margin-right:-.9em">Next</label>
<input type="radio" id="radio2" value="CloseCase" name="radio" /><label for="radio2" style="margin-right:-.9em">Close Case</label>
<input type="radio" id="radio3" value="CloseWeb" name="radio" /><label for="radio3" style="width: 109px">Close Web</label>
</div>
そのため、そのラジオの下にボタンがあり、ラジオの選択に応じて異なるコードビハインドを実行したいと考えています。その値は に格納されselValue
ます。onclick
では、イベントに内部のものを実行するように指示するにはどうすればよいですかselValue
ボタン
<asp:Button ID="ButtonRadioValue" CssClass="customButton" runat="server" onclick=" js variable here" Text="Aceptar" style="width: 111px; height: 30px"/>
ありがとう。
編集
クライアント側の手順は実際には必要なかったためです。私はサーバー側からそれをやったthis.radio1.Checked == true