-2
工作,爲什麼這項工作:爲什麼不鏈接在IE8/9
el = document.getElementById('STR');
if(el){
el.checked = true;
el2 = el.cloneNode(false);
el.parentNode.insertBefore(el2, el);
el2.setAttribute('id','');
el2.setAttribute('disabled','disabled');
el2.removeAttribute('name');
el.removeAttribute("disabled");
el.style.display="none";
}
但這並不:
el = document.getElementById('STR');
if(el){
el.checked = true;
el2 = el.cloneNode(false);
el.parentNode.insertBefore(el2, el);
el2.setAttribute('id','');
el2.setAttribute('disabled','disabled').removeAttribute('name');
el.removeAttribute("disabled");
el.style.display="none";
}
在Firefox/Chrome中最後片段完美的作品。