JS statistics Flash has been clicked by the user's code _javascript skills

Source: Internet
Author: User
Tags setcookie
JS how to know flash advertising bar by netizens clicked?
1, flash advertising is not what I do, its link is written in the inside.
2, I want to count the number of times this flash has been clicked by netizens.
It consists of three JS, it is an advertising alliance website, statistics Flash is clicked application, but I will not modify into my application, please help to see, thank you, my click Statistics is count.asp how to write a JS can be statistics, thank you

1.js
--------------------------------
var ed_ads_furl=top.window.location;
var ed_ads_debug;
Ed_ads_url= "http://g.ad68.com/";
ed_ads_id=358;
ed_ads_uid=829;
ed_ads_webtest=0;
ed_ads_replace=0;
ed_ads_width=555;
ed_ads_height=80;
Ed_ads_class=1;
Ed_ads_pic_url= "http://253.ad68.com/union/1d/555_80.swf";
Ed_ads_open_time= "0";
ed_ads_open_class= "1";
ed_ads_logo= "0";
ed_ads_tempstop= "0";
Ed_ads_group= "";
ed_ads_debug=0;
document.write (' <script language= "javascript" type= "Text/javascript" src= "2.js" ></script>);
document.write (' <script language= "javascript" type= "Text/javascript" src= "3.js" ></script>);
-----------------------------------------
2.js
-----------------------------------------
document.write (' <div id=ads_class_show ' +ed_ads_url+ ' style= ' position:static; width: ' +ed_ads_width+ ' px; top:0; left:0; visibility:visible; Z-index:1; Height: ' +ed_ads_height+ ' px; ><iframe src= "' +location_url+ '" marginwidth=0 marginheight=0 hspace=0 vspace=0 FRAMEBORDER=0 SCROLLING=no WIDTH= ' +ed_ads_width+ ' height= ' +ed_ads_height+ ' ></iframe></div> ');
------------------------------
3.js
-----------------
var caution = False


function Setcookie (name, value, expires, path, domain, secure) {
var Curcookie = name + "=" + Escape (value) +
((expires)? "; Expires= "+ expires.togmtstring ():" ") +
((path)? "; Path= "+ Path:" "") +
(domain)? "; domain= "+ Domain:" "") +
(secure)? "; Secure ":" ")
if (!caution | | (name + "=" + Escape (value)). Length <= 4000)
Document.cookie = Curcookie
Else
if (Confirm ("Cookie exceeds 4KB and would be cut!"))
Document.cookie = Curcookie
}


function GetCookie (name) {
var prefix = name + "="
var cookiestartindex = document.cookie.indexOf (prefix)
if (Cookiestartindex = = 1)
return null
var cookieendindex = document.cookie.indexOf (";", Cookiestartindex + prefix.length)
if (Cookieendindex = = 1)
Cookieendindex = Document.cookie.length
Return unescape (document.cookie.substring (Cookiestartindex + prefix.length, Cookieendindex))
}



function Deletecookie (name, path, domain) {
if (GetCookie (name)) {
Document.cookie = name + "=" +
((path)? "; Path= "+ Path:" "") +
(domain)? "; domain= "+ Domain:" "") +
"; Expires=thu, 01-jan-70 00:00:01 GMT "
}
}



function Fixdate (date) {
var base = new Date (0)
var skew = Base.gettime ()
if (Skew > 0)
Date.settime (Date.gettime ()-skew)
}



var now = new Date ()
Fixdate (now)


if (ed_ads_class==9)
Now.settime (Now.gettime () + 24 * 60 * 60 * 1000)
else if (ed_ads_class==2)
Now.settime (Now.gettime () + 0.03 * 60 * 60 * 1000)
Else
Now.settime (Now.gettime () + 1.5 * 60 * 60 * 1000)
var ed__state__visits = GetCookie ("Ed__state__ip_check_" +ed_ads_id)


if (!ed__state__visits)
Ed__state__visits = 1
Else
Ed__state__visits = parseint (ed__state__visits) + 1
Setcookie ("Ed__state__ip_check_" +ed_ads_id, Ed__state__visits, now)
Setcookie ("Ed__state__test", now, now)
var ed__state__test = GetCookie ("Ed__state__test")
if (Ed__state__test!=now) ed__state__visits=0
Location_url= ' +ed_ads_url+ ' pds_k/view.php?id= ' +ed_ads_id+ ' &uid= ' +ed_ads_uid+ ' &rePlace= ' Replace+ ' &visits= ' +ed__state__visits+ ' &a_width= ' +ed_ads_width+ ' &a_height= ' +ed_ads_height+ ' class= ' +ed_ads_class+ ' &a_pic_url= ' +ed_ads_pic_url+ ' &ed_str= ' +escape (ed_ads_furl) + ' &ed_ads_open_ class= ' +ed_ads_open_class+ ' &ed_ads_logo= ' +ed_ads_logo+ ' &ed_ads_tempstop= ' +ed_ads_tempstop+ ' _webtest= ' +ed_ads_webtest+ ' &ed_ads_group= ' +ed_ads_group;
<textarea id="runcode428"><ptml> <pead> <title> worry-Free scripting code test page </title> </pead> <body> <script language= "JavaScript" > var clicknum = 0; function Calcount () {alert ("You have clicked Flash" + (++clicknum) + "Times!") "); } </script> <div id=show onclick= "Calcount ()" > <object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-4445535 40000 "codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 "width=" "Height=" > <param name= "movie" value= "myflash.swf" > <param name= "Quality" value= "Hig" H "> <param name=" wmode "value=" Transparent "> <embed src=" myflash.swf "quality=" High "plugins Page= "Http://www.macromedia.com/go/getflashplayer" type= "Application/x-shockwave-flash" width= "200" height= " ></embed></object> </div> </body> </ptml></textarea>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.