0

I am new in MVC. I am working on a view where I add two radio buttons.

<label for="lDIV1">
    <input id="lDIV1" type="radio" name='rbtab' value='DIV1' onclick="javascript:custom()" />Create
    Email:</label>
<label for="lDIV2">
    <input id="lDIV2" type="radio" name='rbtab' checked="checked"  value='DIV2' onclick="javascript:defaul()" />Default
    Email:</label>
<div id='Content' style="display: block">

Now I want to call a function in Action {Http} that is if first radio button is true then call radiobutton1() method or else call radiobutton2() method Can you guys Help me out how to apply conditions..

4

1 回答 1

1

我不确定你想做什么,因为你的问题不是很清楚,但是当你用 jquery 选中一个复选框时,你可以这样做

http://jsfiddle.net/HQXLm/1/

<input id="checkme" type="checkbox" /> click me to find out if im checked

$('#checkme').click(function(){
    if ($(this).is(':checked')){
         alert('I am checked, do something here');   
    }
});
于 2012-01-24T11:12:11.820 回答