让firefox支持window.event
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default5.aspx.cs" Inherits="Default5" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
<script type="text/javascript">
function Check(evt){
evt = (evt) ? evt : ((window.event) ? window.event : "")
if (1<2){
alert("错误!");
evt.returnValue= false;
return false;
}
return confirm('正确');
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Repeater ID="Repeater1" runat="server"
onitemcommand="Repeater1_ItemCommand">
<ItemTemplate>
<asp:LinkButton ID="lb" Text="操作" CommandName="Select" runat="server" OnClientClick="return Check();"></asp:LinkButton>
</ItemTemplate>
</asp:Repeater>
<asp:Button ID="Button1" OnClientClick="return Check()" runat="server"
Text="Button" onclick="Button1_Click" />
</div>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
<script type="text/javascript">
function Check(evt){
evt = (evt) ? evt : ((window.event) ? window.event : "")
if (1<2){
alert("错误!");
evt.returnValue= false;
return false;
}
return confirm('正确');
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Repeater ID="Repeater1" runat="server"
onitemcommand="Repeater1_ItemCommand">
<ItemTemplate>
<asp:LinkButton ID="lb" Text="操作" CommandName="Select" runat="server" OnClientClick="return Check();"></asp:LinkButton>
</ItemTemplate>
</asp:Repeater>
<asp:Button ID="Button1" OnClientClick="return Check()" runat="server"
Text="Button" onclick="Button1_Click" />
</div>
</form>
</body>
</html>