asp上传带显示的代码
2018-09-06 13:03
注意是用到了,下列的演示
<scriptlanguage=JavaScripttype=text/javascript>
adTime=8;
chanceAd=1;
varie=(document.all);
varw3=(document.getElementById&&!ie);
adCount=0;
functioninitAd(){
if(!ns&&!ie&&!w3)return;
if(ie)adDiv=eval(document.all.sponsorAdDiv.style);
elseif(ns)adDiv=eval(document.layers[sponsorAdDiv]);
elseif(w3)adDiv=eval(document.getElementById(sponsorAdDiv).style);
randAd=Math.ceil(Math.random()*chanceAd);
if(iew3)
adDiv.visibility=visible;
else
adDiv.visibility=show;
if(randAd==1)showAd();
}
functionshowAd(){
if(adCount<adTime*10){adCount+=1;
if(ie){documentWidth=document.body.offsetWidth/2+document.body.scrollLeft-20;
documentHeight=document.body.offsetHeight/2+document.body.scrollTop-20;}
documentHeight=window.innerHeight/2+window.pageYOffset-20;}
elseif(w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
documentHeight=self.innerHeight/2+window.pageYOffset-20;}
setTimeout(showAd(),100);}
}
functioncloseAd(){
if(iew3)
adDiv.display=none;
else
adDiv.visibility=hide;
}
function$(obj){
returndocument.getElementById(obj);
}
functioncheckForm(){
if($(file1).value!=)
{
if(/jpgjpeggifbmp/i.test($(file1).value.match(/\.(\w+)$/)[0])==false){
alert(您只能上传图片文件);
returnfalse;
}
else
{
returntrue;
}
}
else
{
alert(您还没有选中需要上传的图片);
returnfalse;
}
}
文件打包下载