udens Posted April 25, 2008 Report Share Posted April 25, 2008 Visur iet uz ie7 neiet, ar js uzgjenereeju radio pogu pieshkjiru name utt bet ieslectet nevar, kaads mosh zin kaa to var apiet? Link to comment Share on other sites More sharing options...
andrisp Posted April 25, 2008 Report Share Posted April 25, 2008 Parādi kodiņu. Link to comment Share on other sites More sharing options...
udens Posted April 25, 2008 Author Report Share Posted April 25, 2008 (edited) Parādi kodiņu. var newRadio=document.createElement('input'); newRadio.setAttribute('type','radio'); newRadio.setAttribute('style','padding-left:3px;'); newRadio.setAttribute('value',a); newRadio.setAttribute('name','correct_'+id); newLi.appendChild(newRadio); nu es taisu aptauju kur ar js tu nospied + un sem jautaajuma pieevienojas inputi kur var savadiit atbildes un katram iputam galaa ir radio visiem radio ir vienaads name lai var noraadiit tikai vienu pareizu atbildi. Edited April 25, 2008 by udens Link to comment Share on other sites More sharing options...
indoom Posted April 25, 2008 Report Share Posted April 25, 2008 (edited) Uz IE elementi, kam grib pēc tam name nolasīt jātaisa citādāk document.createElement('<input name="name">'); crossbrowseru skripts varētu būt šāds function createNamedElement(type,name){ var element=null; try{ element=document.createElement('<'+type+' name="'+name+'">'); }catch(e){ element=document.createElement(type); element.name=name; } return element; } var el = createNamedElement('input','correct_'+id); el.type = 'radio'; Edited April 25, 2008 by indoom Link to comment Share on other sites More sharing options...
Recommended Posts