JS随笔:
<script type="text/javascript" language="javascript">
function show_confirm (){
var confirm_msg=confirm("确定下载?");
if(confirm_msg==true){
window.location.href=www.XXX.com/download/XXX.exe;
return true;
else{
return false;
}
}
}
</script>
<a οnclick="return show_confirm()" >下载XXX.exe</a>
<a οnclick="return show_confirm()" href="www.XXX.com/download/XXX.exe">下载XXX.exe</a>
IE会直接忽略带href的onclick事件