我在使用下面的代码时遇到问题。如果我删除var user_id
and var company_id
,则 javascript 可以正常工作。
为什么这不起作用?
var user_id = user_id;
var company_id = company_id;
if (pageNum == 1)
strActionPage = CurrentPath + "upload.php?act=store&user_id=" + user_id;
else
strActionPage = CurrentPath + "upload.php?act=store&company_id" + company_id;
for(i=0;i<4;i++){
if(document.getElementsByName("ImageType").item(i).checked == true){
strImageType = i + 1;
break;
}
}