首页 新闻 会员 周边

js reurn false 搜狗浏览器不起作用

0
悬赏园豆:10 [已关闭问题] 关闭于 2013-10-23 13:35
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebAppRedis.WebForm1" %>

<!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>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:Button runat="server" OnClientClick="return checkTest()" ID="btn" Text="submit" 
            onclick="btn_Click" />
    </div>
    </form>
</body>
</html>
<script type="text/javascript">

    function checkTest() {


        var a = "1";

        if (a == "1") {
            alert("fall");
            return false;
        }
        else {
            alert("success");
            return true;
        }
    }
</script>
js
问题补充:

没有人品的勿扰。

sunlary的主页 sunlary | 小虾三级 | 园豆:934
提问于:2013-10-22 15:52
< >
分享
所有回答(3)
0

搜狗浏览器,从来没用过...

幻天芒 | 园豆:37175 (高人七级) | 2013-10-22 16:26
0

怎么有两个click绑定事件?

angelshelter | 园豆:9887 (大侠五级) | 2013-10-22 17:41

一个前台,一个后台。

支持(0) 反对(0) 幻天芒 | 园豆:37175 (高人七级) | 2013-10-22 22:44
0

你上面给的代码和你运行的代码好像不一致哦,alert("fall"),为什么截图中会是fail,难道是微软的bug?

空明流光 | 园豆:106 (初学一级) | 2013-10-23 12:57

他连这种简单的单词都打错了,我忍不住给改过来了的。

支持(0) 反对(0) 文飞扬 | 园豆:228 (菜鸟二级) | 2013-10-23 14:21
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册