标题:点击标签按钮 触发不了事件请教
只看楼主
g772f123
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2018-12-28
 问题点数:0 回复次数:1 
点击标签按钮 触发不了事件请教
<!DOCTYPE html>

<html xmlns="http://www.
<head runat="server">
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telphone=no, email=no" />
    <title>九鼎</title>
   
    <link href="newIndex.css" rel="stylesheet" />
    <script src="js/jquery-1.10.2.min.js"></script>
    <script src="/js/lhgdialog/lhgdialog.min.js"></script>
    <script src="/js/entity.js"></script>
    <script src="js/register.js?v=111246"></script>
    <script src="../js/Common.js"></script>
    <style type="text/css">
        .weixin-tip {
            display: none;
            margin: 0;
            padding: 0;
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            background: rgba(255,255,255,0.9);
            filter: alpha(opacity=80);
            height: 100%;
            width: 100%;
            z-index: 100;
        }

            .weixin-tip p {
                text-align: center;
                margin-top: 10%;
                padding: 0 5%;
            }

            .weixin-tip img {
                max-width: 100%;
                height: auto;
            }

        .logo, .register-btn img, .logo-list a:nth-child(1) {
            width: 100%;
        }
    </style>
</head>
<body>
    <div class="weixin-tip" id="androiddownload">
        <p>
            <img src="images/androiddownload.png" alt="在浏览器打开" />
        </p>
    </div>
    <div class="weixin-tip" id="iosdownload">
        <p>
            <img src="images/iosdownload.png" alt="在浏览器打开" />
        </p>
    </div>
    <div class="header">
        <div class="auto-96 logo-list clearfix">
            <a href="#" class="fl">
                <img src="images/logo.png" alt="" class="fl logo" />
                <div class="fl logo-name">
                </div>
            </a>
            <a href="#" class="fr register-btn"></a>
        </div>
    </div>
    <form name="form1" method="post" action="./index.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="Lodb5A7Tr77gssJKiABkM2XfxOEXxGifDTWlsyG0imRpzGkI0zQQlUL4Fir26F7G8JK26jFQgdLBTmCJQqPdgxctOVmSzowVJlPOGubPm7Y=" />
</div>

<div>

    <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="A03CC136" />
</div>
        <div class="col-100 wrap">
            <div class="header-bg">
            </div>
            <form class="" id="form" onSubmit="return false;" name="passwordSet" data-validator-option="{focusCleanup:true, theme:'simple_right'}">
                <div class="main-tit" id="registerList">
                    <img src="images/yun_register_tit.png" alt="" />
                </div>
                <div class="col-100 register-list">
                    <div class="clearfix">
                        <span class="fl">手机号码</span>
                        <input type="text" value="" class="fl" name="pwd2" id="telnum" maxlength="20" />
                    </div>
                    
                    <div class="clearfix">
                        <span class="fl">登录密码</span>
                        <input type="password" value="" class="fl" name="pwd" id="pwd" maxlength="12" />
                    </div>
                    <div class="clearfix">
                        <span class="fl">确认密码</span>
                        <input type="password" value="" class="fl" name="pwd2" id="pwd2" maxlength="20" />
                    </div>
                    

                    <div class="clearfix">
                        <span class="fl">&nbsp;</span>
                        <input id="btnSendCode1" type="button" value="获取验证码" style="width: 100px" />
                    </div>
                    <div class="clearfix">
                        <span class="fl">手机验证码</span>
                        <input type="text" value="" class="fl" name="pwd2" id="telcode" maxlength="20">
                    </div>
                    <div class="agreement clearfix">
                        <input type="checkbox" name="agreementInput" value="我已阅读并接受《开户服务协议》" id="agreementCheckbox">
                        <span class="active"></span>
                        <label for="agreementCheckbox">我已阅读并接受《开户服务协议》</label>
                    </div>
                    <div class="button-active" id="submitBtn">
                        <input id="btnReg" type="button" value="" />
                    </div>
            
   
                </div>
            </form>


        <script>download();</script>

        
        <div class="alert-info" id="alertInfo">
           
            <a href="javascript:;" id="closeBtn">
                <img src="images/alert_btn_info.png" /></a>
        </div>
        <div class="window-mask"></div>
        <script>
            $(".agreement").on("click", function () {
                checkboxclick(this);
            })
            //checkbox的点击事件绑定
            var checkboxclick = function (obj) {
                if ($(obj).children("input").is(":checked")) {
                    $(obj).children("span").addClass("active");
                } else {
                    $(obj).children("span").removeClass("active");
                }
            }

            $("#closeBtn").on("click", function () {
                $("#alertInfo").hide("show");
                $(".window-mask").hide("show");
            })
            var isShouci = false;
            $(function () {
                var android_url = Download.androUrl;
                var ios_url =
                $('.download').click(function () {
                    var host = location.host
                    if (host.indexOf('www.') > -1 || host.indexOf('jc.') > -1 || host.split('.').length == 2) {

                    }
                    else if (!isShouci && !isReg) {
                        $("#alertInfo").show("show");
                        $(".window-mask").show("show");
                        isShouci = true;
                        return;
                    }
                    var ua = navigator.userAgent;
                    if (!!ua.match(/(i[^;]+;( U;)? CPU.+Mac OS X/)) {
                        location.href = ios_url;
                    } else {
                        location.href = android_url
                    }
                })
            })
        </script>
        
        <script>
            $(function () {
                var isSend1 = false, sss = 30;
                $('#btnSendCode1').click(function () {
                    if (isSend1) return;
                    var telnum = $('#telnum').val();
                    if (telnum == "") {
                        $.dialog.alert('请输入手机号!', function () {
                            $("#telnum").focus();
                        });
                        return;
                    }
                    if (!(/^1[3|4|5|7|8][0-9]{9}$/.test(telnum))) {
                        $.dialog.alert('手机号格式不正确!', function () {
                            $("#telnum").focus();
                        });
                        return;
                    }
                    isSend1 = true;
                    $.post("/WS/Account.ashx?action=SendCode", { phone: telnum }, function (data) {
                        if (data && data.code == 0) {
                            $.dialog({
                                icon: 'success.gif', content: "发送成功", close: function () {
                                    my_interval = setInterval(function () {
                                        if (sss > 0) {
                                            $('#btnSendCode1').val("发送中" + sss + "s");
                                            sss--;
                                        } else {
                                            clearInterval(my_interval);
                                            isSend1 = false;
                                            $('#btnSendCode1').val("获取验证码");
                                        }
                                    }, 1000);
                                }
                            });
                        }
                        else {
                            isSend1 = false;
                            $.dialog.alert(data.msg)
                        }
                    })

                })
            });
        </script>
        <script>
            var ua1 = window.navigator.userAgent.toLowerCase();
            if (ua1.match(/MicroMessenger/i) == "micromessenger" || ua1.match(/WeiBo/i) == "weibo") {

                //iphone-微信 iphone-微博 iphone-qq
                var winHeight = $(window).height();
                if (ua1.indexOf('android') > -1 || ua1.indexOf('adr') > -1) {
                    $("#androiddownload").css("height", winHeight);
                    $("#androiddownload").show();
                }
                else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {

                    $("#iosdownload").css("height", winHeight);
                    $("#iosdownload").show();
                }
            }
        </script>
    </form>
</body>
</html>









点击了获取验证码 没有反应 发送不了验证码
搜索更多相关主题的帖子: name script div class function 
2018-12-28 17:37
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1214
专家分:1366
注 册:2005-3-14
得分:0 
你先试试验证手机号是否正确认的代码是否可以运行,即错误的手机号或空是否有提示信息,
单就你上面这代码应该是不能运行,$.dialog.alert,
至少上文中就没有找到class = "dialog"的元素。按你写的应该要有一个层<div class='dialog'  .....>

把$.dialog.alert(**)改成alert(**)即可运行了

http://toorup.3v.do
loading...
2019-01-03 09:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-492355-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016921 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved