首页 > 代码库 > 组合代码

组合代码

<script> 
url = new Array(12); 
url[0] = ‘http://luhangchepin.tmall.com/search.htm?&orderType=hotsell_desc‘
url[1] = ‘http://luhangchepin.tmall.com/‘
url[2] = ‘http://detail.tmall.com/item.htm?id=39225192098‘
url[3] = ‘http://detail.tmall.com/item.htm?id=39186707809‘
url[4] = ‘http://detail.tmall.com/item.htm?id=39210725925‘
url[5] = ‘http://detail.tmall.com/item.htm?id=39202369394‘
url[6] = ‘http://detail.tmall.com/item.htm?id=38533012009‘
url[7] = ‘http://detail.tmall.com/item.htm?id=38486132508‘
url[8] = ‘http://detail.tmall.com/item.htm?id=36303296167‘
url[9] = ‘http://detail.tmall.com/item.htm?id=35858983107‘
url[10] = ‘http://detail.tmall.com/item.htm?id=35730780499‘
url[11] = ‘http://detail.tmall.com/item.htm?id=35716411225‘
urlx = Math.floor(Math.random() * url.length); 
var isPoped = false; 
//随机函数 注意数字顺序
document.onclick = function() 
{ 
if (!isPoped) 
{ 
window.open(url[urlx]); 
isPoped = true; 
} 
} 
 //document.write(‘<a id="go" href="http://www.mamicode.com/‘+url[urlx]+‘">更多精彩内容...</a>‘);
//go.click();
</script>