点击图片广告后显示下载地址的方法
作者:cmscn 日期:2005-06-29
1、在<!-- #include file="include/con_down.asp" -->下面一行加入:
<script language="Javascript" type="text/javascript">
<!--
function will() {
if (event.srcElement.tagName=='IMG') {
window.focus();
oUrl.style.display = "";
yAd.style.display = "none";
}
}
//-->
</script>
2、找到<tr class=bg><td>下载地址:</td><td colspan=2>这一行,在下面插入
<div id="yAd">
<base onclick="Javascript:will()" />
<font class=red>点击下面图片,就会出现下载地址!</font><br>
<a href='http://qoekoe.vicp.net/' target='_blank'><img border=0 src='http://qoekoe.vicp.net/images/logo.gif' width=88 heigh=31 alt='『 乔客菜鸟联盟 』'></a>
</div>
<div id="oUrl" style="display:'none'">
再往下找,找到
response.write " <font class=red_3><b>暂停下载</b></font>"
end if
%>
在%>后面加上</div>
点击FLASH广告后显示下载地址的方法
若要实现点击FLASH文件出现下载地址,修改两处即可:
将<script language="Javascript" type="text/javascript">
<!--
function will() {
if (event.srcElement.tagName=='IMG') {
window.focus();
oUrl.style.display = "";
yAd.style.display = "none";
}
}
//-->
</script>
改为
<script language=Javascript type=text/javascript>
function will()
{if (event.srcElement.tagName=='A'||event.srcElement.tagName=='IMG')
{window.focus();
oUrl.style.display = "";
yAd.style.display = "none";}}
</script>
第2步修改为:
<DIV id=yAd><BASE onclick=Javascript:will() target=_blank>
<table width="100%" height="33%" border="1" cellpadding="1" cellspacing="1">
<tr><td align="center"><font class=red>请支持本站发展,点击下面图片后进行下载。第一步:点击下面的图片广告</font></td></tr>
<tr><td height="60" align="center">
<script language="Javascript" type="text/Javascript" src="http://union.3721.com/ads/ads.js?id=94513&ads=1&img_url=http%3A%2F%2Funion.3721.com%2Fimages%2FIM468-60.swf&img_type=1&img_h=60&img_w=468"> </script> </td></tr>
<tr><td align="center"><font class=red>第二步:点击下面的文字广告</font></td></tr>
<tr><td align="center">
<script language="Javascript" type="text/Javascript" src="http://union.3721.com/ass/txt_4.js?pid2=A_softxb_127055"></script>
</td></tr>
</table>
</div>
<div id="oUrl" style="display:'none'">
修改down_view.asp
1.在
<td align=center><%response.write commend_friend(tit,d_name,"down_view.asp?id="&id)%></td>
</tr>
<tr class=bg><td>下载地址:</td><td colspan=2>
这个下面加上
<script language="JavaScript" type="text/javascript">
<!--
function will() {
if (event.srcElement.tagName=='A'||event.srcElement.tagName=='IMG') {
window.focus();
oUrl.style.display = "";
yAd.style.display = "none";
document.cookie='joekoe_online=yes';
}
}
function web__cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
//-->
</script>
<div id="yAd">
<base onclick="Javascript:will()" />
<font class=red>点击下面图片,就会出现下载地址!(广告只出现一次,请愿谅)</font><br>
<script src="http://online.265.com/cn/4/22864_13298.php"></script>
</div>
<div id="oUrl" style="display:'none'">
<script language="JavaScript">
if (web__cookie('joekoe_online') !='') {
oUrl.style.display = "";
yAd.style.display = "none";
}
else{
oUrl.style.display = "none";
yAd.style.display = "";
}
</script>
评论: 5 | 引用: 0 | 查看次数: 903
发表评论