First of all the question will be simple to you but i have a doubt that whether can we use name
value instead of id
or class
like this
var name_type=$('.abc_type').attr('name','type');
i just tried like this but of no use
var name_type=$('input[name=type]').attr('name','type');