JavaScript开发经验1var returnValue alert(type)switch (type){case 1:returnValue document.fo
JavaScript开发经验1
var returnValue = "";alert(type);switch (type) { case "1":returnValue = document.form1.BOOKMATERIAL.value;alert("aaa->"+returnValue);break;case "2":returnValue = document.form1.IMAGEMATERIAL.value;break;case "3":returnValue = document.form1.PRINTINGMATERIALS.value;break;case "4":returnValue = document.form1.AUDIOMATERIALS.value;break;case "5":returnValue = document.form1.RESIDENTSATTENDANCE.value;break;case "6":returnValue = document.form1.ELSEMATERIALS.value;?注意:在JavaScript中switch的使用方法,而且要注意: case后的选项值!?"1"??不同于 1 ,这一点一定要注意,否则 不能事先预想得到的结果呀!
?
?
?
?
?
