asp上传带显示的代码_ASP教程-查字典教程网
asp上传带显示的代码
asp上传带显示的代码
发布时间:2016-12-29 来源:查字典编辑
摘要:注意是用到了,下列的演示adTime=8;chanceAd=1;varns=(document.layers);varie=(documen...

注意是用到了,下列的演示

<scriptlanguage="JavaScript"type="text/javascript">

adTime=8;

chanceAd=1;

varns=(document.layers);

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(ie||w3)

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;}

elseif(ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;

documentHeight=window.innerHeight/2+window.pageYOffset-20;}

elseif(w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;

documentHeight=self.innerHeight/2+window.pageYOffset-20;}

adDiv.left=documentWidth-100;adDiv.top=documentHeight-0;

setTimeout("showAd()",100);}

}

functioncloseAd(){

if(ie||w3)

adDiv.display="none";

else

adDiv.visibility="hide";

}

function$(obj){

returndocument.getElementById(obj);

}

functioncheckForm(){

if($("file1").value!="")

{

if(/jpg|jpeg|gif|bmp/i.test($("file1").value.match(/.(w+)$/)[0])==false){

alert("您只能上传图片文件");

returnfalse;

}

else

{

returntrue;

}

}

else

{

alert("您还没有选中需要上传的图片");

returnfalse;

}

}

文件打包下载

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新ASP教程学习
    热门ASP教程学习
    编程开发子分类