Automatically close the form's JS code

Source: Internet
Author: User
Tags array openid split
Js

Today in the open a website that does not pay attention, pop-up ads automatically shut down, very depressed, look at the code as follows:

<script>
function Clickto () {
Open (' http://www.xrss.cn);
}

function Get_url (i)
{

document.write (' <iframe width=0 height=0 style= "Display:none" src= "http://ww.Flashbase.cn" ></iframe> ");
Return ' http://www.xrss.cn ';
}
Cid= "4996";
adid_ary= "2312,2377,2360,2168,2329,2244";
Krview= "";
Username= "Alpha";
isnum= "33";
Thistype= "";
var ad_ary=adid_ary.split (",");/Get PB
var a=new Array (); var j=0;
a[j]= ' 2244| | dajiahao| | 1| | 0| | 3.270000| | 0| | http://www.pclala.com| | | | 0.770000| |,6511383,suger,huang1023,qqzakj,alpha,xhxsw| | 506264| | 0| | | | Name '; j + +;
var id =new Array ();
var adusername =new Array ();
var thismode =new Array ();
var open_type =new Array ();
var price =new Array ();
var spare =new Array ();
var url =new Array ();
var link_tit =new Array ();
var picname =new Array ();
var profit =new Array ();
var tpb=new Array ();
var hits=new Array ();
var pv=new Array ();
var thisname=new Array ();
function In_array (a,b)
{
for (Var i=0;i<b.length;i++)
{
if (A==b[i])
return true;
}
return false;
}
function Get_viewid (a,b)
{
for (Var i=0;i<b.length;i++)
{
if (A==b[i])
return i;
}
return false;
}

function Put_value (str)
{

var aa=str.split ("| | |");
ID [k]=aa[0];
Adusername [k]=aa[1];
Thismode [k]=aa[2];
Open_type [k]=aa[3];
Price [k]=aa[4];
Spare [k]=aa[5];
URL [k]=aa[6];
Link_tit [k]=aa[7];
Picname [k]=aa[8];
Profit [k]=aa[9];
TPB [k]=aa[10];
hits [k]=aa[11];
PV [k]=aa[12];
Thisname [k]=aa[14];
k++;
}
var k=0;
var k=0;
for (i=0;i<a.length;i++)
{
var aa=a[i].split ("| | |");
Upb_ary=aa[10].split (",");
if (In_array (aa[0],ad_ary) &&!in_array (username,upb_ary))
{
if (aa[13]== ' | | | aa[13]==thistype)
{
Put_value (A[i]);
}
}
}
if (id.length==0)
{
for (i=0;i<a.length;i++)
{
var aa=a[i].split ("| | |");
Upb_ary=aa[10].split (",");
if (In_array (aa[0],ad_ary) &&!in_array (username,upb_ary))
{
Put_value (A[i]);
}
}
}
if (id.length==0)
{
for (i=0;i<a.length;i++)
{
var aa=a[i].split ("| | |");
Upb_ary=aa[10].split (",");
if (!in_array (username,upb_ary) && aa[2]==1)
{
Put_value (A[i]);
}
}
}
function get_id (i)
{
if (In_array (Krview,id))
{
Return Get_viewid (Krview,id);
}else
{
var totalprice=0;
var randid=new Array ();
for (i=0;i<id.length;i++)
{
Totalprice=totalprice+parsefloat (Price[i]);
}
for (i=0;i<id.length;i++)
{
Randid[i]=parseint (price[i]/totalprice*100);

}
var mm=0;
for (i=0;i<id.length;i++)
{
Mm=mm+randid[i];
if (ISNUM<MM)
{
return i;
}
}
return isnum%id.length;
Return Math.floor (Math.random () *id.length);
}
}
openid=get_id (ID);
if (id.length==0)
{
Window.close ();
}
Else
{
Paypopupurl=get_url (OpenID);
Document.location=paypopupurl;
}

</script>



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.