I am trying to delete html elements dynamically.In the picture i have created a submit button whose id is va.When i select button from dropdown and put va in id and hit remove it should remove the element. Dynamic elements are getting created in registrationform div.
$("#remove").click(function(){
var elementtocreate = $("#elementtocreate").val();
var id = $("#id").val();
console.log("Name : "+elementtocreate+"ID: "+id);
$("#"+id).remove();
});