document.getElementById("google").onclick = function(){
var link = this.href;
if(this.clickTimeout){
// 双击
clearTimeout(this.clickTimeout);
this.clickTimeout = null;
alert(link);
}
else{
// 单击
var elem = this;
this.clickTimeout = setTimeout(function(){
// 跳转到相应网址
elem.clickTimeout = null;
window.location.href = link;
}, 250);
}
//阻止链接onclick时的默认行为
return false;
};