修改的方法:
function copyUserInput() {
if (original instanceof HTMLTextAreaElement) clone.innerHTML = original.value;
if (original instanceof HTMLInputElement) {
let _type = original.type;
if((_type=="checkbox" || _type=="radio")&&original.checked){
clone.setAttribute("checked", true);
}else{
clone.setAttribute("value", original.value);
}
}
}
。。。。未完待续