如果有 aaa bbb ccc ddd eee..<script>
function sysp(){
document.all('aaa').length=0;
document.all('bbb').length=0;
document.all('ccc').length=0;
document.all('ddd').length=0;
document.all('eee').length=0;
}
</script>
function sysp(){
document.all('aaa').length=0;
document.all('bbb').length=0;
document.all('ccc').length=0;
document.all('ddd').length=0;
document.all('eee').length=0;
}
</script>
function sysp(selectname){
if(document.all[selectname].tagName == "SELECT")
document.all[selectname].length = 0;
}
</script>
通过传递名字以适用各种情况
{
for(var i=e.options.length; i>-1; i--)
e.options.remove(i);
}
mm(document.forms[0].aaa);
mm(document.forms[0].bbb);
mm(document.forms[0].ccc);
for (var i=0;i<obj.options.length;i=i+1){
obj.option[i]=null}
}
function sysp(){
clearoption(document.forms[0].aaa)
clearoption(document.forms[0].bbb)
clearoption(document.forms[0].ccc)
}
function sysp(){
document.forms[0].aaa.innerHTML=""
document.forms[0].bbb.innerHTML=""
document.forms[0].ccc.innerHTML=""
}
<script>