js拦截alert对话框另类应用
(编辑:jimmy 日期: 2025/7/3 浏览:3 次 )
复制代码 代码如下:
<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>
<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>
下一篇:javascript图像处理—仿射变换深度理解