手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp上传带显示的代码
asp上传带显示的代码
摘要:注意是用到了,下列的演示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中创建多级目录的两段代码

用ASP VBS xmlhttp adodbstream下载和保存图片的代码

上一篇,下一篇过程代码

本人常用的分页代码

一段几乎可以让你死机的JS代码

asp 中常用的文件处理函数

asp下载防盗链代码

很不错的一个UBB代码

简单过滤一下广告的代码

ASP整理一些实用的速查代码

精品推荐
分类导航