I ve one dropdownlist & t开发者_如何学JAVAwo textboxes. Once I fill them, (on click of a button) I want to append them in a table row dynamically along with a radio button as the third column.
The below code is working, but not sure why the onclick event of radio button is not responding. I am using MVC 3.0.
function Contact_OnAddTelephone() {
var type = $("#rdoTelephoneType").val();
var areaCode = $("#txtAreaCode").val();
var number = $("#txtNumber").val();
var radio = $('<input>').attr({
type: 'radio', id: 'rdoTelePrimary', name: 'rdoTelePrimary'
});
$('#tableTelephone tr:last').after("<tr><td>" + type + "</td><td>" + areaCode + "-" + number + "</td><td>" + radio[0].outerHTML + "</td></tr>");
}
精彩评论