服务器中不能用的.只能在客户端,你的代码可以改为:
if ((ext.toLowerCase() != "doc") || (ext.toLowerCase() != "xls"))
{
Response.write("<script language='javascript'>alert('文件类型不正确!');location='1.htm';</script>");
}
if ((ext.toLowerCase() != "doc") || (ext.toLowerCase() != "xls"))
{
Response.write("<script language='javascript'>alert('文件类型不正确!');location='1.htm';</script>");
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货