日期:2014-05-16  浏览次数:20363 次

js 拦截alert对话框


<input type="button" onclick="opened('ALERT')" value="提示"/>

<script>
?var myAlert=alert;
?window.alert=function(msg){??????
???//your code????????
??myAlert?(msg+"-TEST");
?}
?function opened(msg){
??alert(msg);
?}
</script>

1 楼 aeolusj 昨天  
var myAlert=alert;改为var myAlert=window.alert;方可实现拦截