Jump to content
php.lv forumi

Input lauki viens zem otra, bez nekāda atkāpuma


Sasa
 Share

Recommended Posts

Kā lai es izvadu input laukus katru tieši zem iepriekšēja lai starp tiem nebūtu nekāds tukšums?

 

for (i=0;i<elementCount_garums;i++ )
{
x++;
  var lyr = document.getElementById('input_area'); //layer to create under
  var newEl = document.createElement('input'); //element type
  var newEl_1 = document.createElement('<br>'); //element type <br>
  newEl.setAttribute('id','z');
  newEl.setAttribute('name','attach'+x)
  newEl.setAttribute('type','file')
  newEl.setAttribute('size','25')
  newEl.setAttribute('style','padding:0px')
 //newEl.onchange= function () { addElement(); }
  lyr.appendChild(newEl);
  lyr.appendChild(newEl_1);
 //alert( i);
}

Link to comment
Share on other sites

 Share

×
×
  • Create New...