[Html]
@foreach (var item in Model.QueryList)
{
<input type="checkbox" name="chklist" value="@item.Id" />
<select name="ddllist">
<option value="@item.Id">@item.Id</option>
</select>
}
<script>
//1,2,3 -- type:string[]
var chkvalues = $("input[name$='chklist']:checked").map(function () {
return this.value;
}).get();
//1,2,3 -- type:string[]
var ddlValues = $("select[name=ddllist]").map(function () {
return this.value;
}).get();
</script>
留言
張貼留言