<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>sssss</title>
<script>
function f1()
{
alert(1);
}
function f2()
{
////请问,f2如何定义或者重写才不会执行f1()里面的方法
}
</script>
</head>
<body>
<div onclick=" f1()">
<div onclikc="f2()"></div>
</div>
</body>
</html>
请问,f2如何重写才不会弹出执行f1()里面的方法
<html>
<head>
<title>sssss</title>
<script>
function f1()
{
alert(1);
}
function f2()
{
////请问,f2如何定义或者重写才不会执行f1()里面的方法
}
</script>
</head>
<body>
<div onclick=" f1()">
<div onclikc="f2()"></div>
</div>
</body>
</html>
请问,f2如何重写才不会弹出执行f1()里面的方法
在f2中设置isFirefox ? event.stopPropagation() : window.event.cancelBubble = true;
onclick写错了在f2里面写上event.cancelBubble = true就行了