var name = document.querySelectorAll('.info input[type=text]');
var name1 = document.querySelectorAll('.info input[type=text]');
console.log(name);
console.log(name1);
<div class='info'>
<div>
<div><label id="dd">Name</label><input type='text'></div>
<div><label>Father Name</label><input type='text'></div>
</div>
</div>
javascript is producing different results for same code, only variable name is different. this is the output produced on my device
nameandname1variables are referencing the same dom elements. You could simply give both of yourinput's a uniqueidand use that get their reference.