var parents = document.getElementsByClassName('box');
var p = document.createElement('input');
Array.prototype.forEach.call(parents, function(parent) {
p.innerHTML = 'type="text"';
parent.appendChild(p);
});
<span class="box">
" Раз два три "
</span>