精品国语人妻色乱码二区,免费乱理伦片在线观看2018,日韩精品视频在线播放,高潮无码又爽又刺激视频在线

<source id="8jepl"><menu id="8jepl"></menu></source>
    <source id="8jepl"><menu id="8jepl"></menu></source>
    <rp id="8jepl"><mark id="8jepl"><label id="8jepl"></label></mark></rp>
          <source id="8jepl"><menu id="8jepl"><label id="8jepl"></label></menu></source>
          <source id="8jepl"></source>
              <source id="8jepl"></source>
                <video id="8jepl"><menu id="8jepl"></menu></video>
                0712-2888027 189-8648-0214
                微信公眾號

                孝感風(fēng)信網(wǎng)絡(luò)科技有限公司微信公眾號

                當(dāng)前位置:主頁 > 技術(shù)支持 > Javascript/JQuery > JQuery用戶提交登記信息進(jìn)行驗(yàn)證的代碼片段

                JQuery用戶提交登記信息進(jìn)行驗(yàn)證的代碼片段

                時(shí)間:2018-05-03來源:風(fēng)信官網(wǎng) 點(diǎn)擊: 650次
                以下為風(fēng)信建站項(xiàng)目開發(fā)中所使用的JQuery用戶提交登記信息進(jìn)行驗(yàn)證的代碼片段,分享給大家使用。
                var $holder = $("body").on("click", ".quick-register .submit-btn,.quick-register-static .submit-btn", function() {
                    var data = {},
                        $this = $(this),
                        $need = $this.parents('form').find('[name="need"]'),
                        $phone = $this.parents('form').find('[name="phone"]'),
                        $page = $this.parents('form').find('[name="page"]'),
                        $price = $this.parents('form').find('[name="price"]'),
                        $brand = $this.parent('form').find('[name="brand"]'),
                	$category = $this.parent('form').find('[name="category"]'),
                	$detail_id = $this.parent('form').find('[name="detail_id"]');
                    data.need = $need.val();
                    data.phone = $phone.val();
                    data.page = $page.val();
                    data.price = $price.val();
                    data.detail_id = $detail_id.val();
                    data.brand = $brand.val();
                    data.category = $category.val();
                    if (data.need.length == 0 || data.price.length == 0 || data.phone.length == 0) {
                        if (ismobile) {
                            return alert("請?zhí)顚懕匾畔ⅲ?quot;);
                        } else {
                            return showAlert("請?zhí)顚懕匾畔ⅲ?quot;);
                        }
                    }
                
                    $.get('/quick_register', data, function(result) {
                        // 登記成功之后
                        if (result != 'no') {
                        	leftPhoneFrom(data.phone, data.detail_id, data.need, data.brand, data.category);
                            $('.quick-register-count').html(result);
                            if($need.attr("type") != "hidden"){
                                $need.val("");    
                            }
                            $phone.val("");
                            vex.close();
                            if (ismobile) {
                                alert("提交成功!\n客服將會及時(shí)聯(lián)系您!");
                                if (location.pathname == '/quick_register/page') {
                                    history.back();
                                }
                            } else {
                                showAlert("提交成功!<br>客服將會及時(shí)聯(lián)系您!", 0, function() {
                                    if ($this.parents('.pop-register').find('.close-btn').length > 0) {
                                        $this.parents('.pop-register').find('.close-btn').trigger("click");
                                    }
                                });
                            }
                        } else {
                            if (ismobile) {
                                alert("請?zhí)顚懕匾畔ⅲ?quot;);
                            } else {
                                showAlert("請?zhí)顚懕匾畔ⅲ?quot;);
                            }
                        }
                    });
                });
                熱門關(guān)鍵詞: JQuery 用戶提交 登記信息
                欄目列表
                推薦內(nèi)容
                熱點(diǎn)內(nèi)容
                展開