治愈你的身体全文:网页中如何实现点击多个广告才显示下载

来源:百度文库 编辑:高校问答 时间:2024/05/06 03:58:14
一个网页设计的问题。请高手贴出源代码,让我学习下。

1.实现点击多个广告的我就不知了,看看下面这两个对你有没有用

----------------------------------------------------------
把下面代码copy入你html文件的<head>和</head>中

<script language="javascript">
<!-- Begin
var num = 2;
var mypage = ‘../pages/java1.htm‘;
var pissoff = ‘ 你必须先点击上面的广告链接 ‘;
allow = Array();
allow[num] = 2;
function gotoit(link){
if (link != num){
allow[link] = 2;
} else {
for (I=1;I<=num;I++){
if (allow[I] != 2){
I = num + 1;
lemmeIn = 0;
} else {
lemmeIn = 1;
}
}
if (lemmeIn == 1){
window.location = mypage;
} else {
alert(pissoff);
}
}
}
//--->
</script>

把下面代码copy入你html文件的<body>和</body>中即可:

<a HREF="http://www.cncash.com/cgi-bin/ba/random.cgi?job=go&id=233" onClick="gotoit(1)" target="_blank">
<img SRC="http://www.cncash.com/cgi-bin/ba/random.cgi?id=233" BORDER="0"
width="468" height="60"></a>

将以上广告代码改成你实际的广告代码,onClick="gotoit(1)"不能删!

<a href="javascript:gotoit(num)">进入</a>
<script language="javascript">
<!--
document.write(‘<a href="../pages/java1.htm" target="_top"></a>‘);/* 你访问者想进入的链接 */
//-->
</script>

----------------------------------------------------
2.真假链接地址

---------------------------------------------------
<base target="_blank" onclick="javascript:will()" />
<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='goodfont=yes';
}
}
function get_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">
<a href='http://weste.net' target=_blank>点此一下就能显示下载地址</a>
</div>
<!-- 广告代码结束 -->
<div id="oUrl" style="display:'none'">
<script language="javascript">function JyDownH(htmlurl){var newwin=window.open(htmlurl,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');return false;}
</script>
<A href='http://cc163.driversky.com/down/KuiBu_inst.exe' target=_blank>真实下载地址</A>
</div>