嗯,说实话,我不知道可能出现什么问题:
function SubmitChosenForm() {
var aForm = null;
switch (g_sourceType) { // global var, value is 'client' according to firebug
case 'client':
aForm = document.getElementById('group_form');
break;
case 'session':
aForm = document.getElementById('device_form');
break;
case 'device':
aForm = document.getElementById('stn_form');
break;
case 'saveset':
aForm = document.getElementById('client_form');
break;
default:
break;
}
if (null == aForm) aForm = document.getElementById('upper_menu_form');
aForm.submit();
}
JS应该在case
之后接受String,对吗?
但是当我尝试使用Firebug进行调试时,我从未到达if (null==...
行。
我做错了什么???