document.write('
'); var arr= ''; var this_city_id= 'qz'; dropDown("estate_title","auto0","http://house.lanfw.com/api/lfw_common_select_lp/data.php?city_id="+this_city_id+"&callback=?",arr); $(document).ready(function(){ // 报名看房团 $("#btn_add_tuan_index").click(function(){ var data = { "name": $("#g_name").val(), "mobile": $("#g_mobile").val(), "estate_title": $("#estate_title").val(), "estate_id": $("#bm_estate_id").val(), "city_id": this_city_id, "this_url":'http://'+this_city_id+'.lanfw.com', } if($.trim(data.name) == '') { ZENG.msgbox.show('姓名不能为空', 5, 2000); $("#g_name").focus(); return false; } if($.trim(data.mobile) == '') { ZENG.msgbox.show('手机不能为空', 5, 2000); $('#g_mobile').focus(); return false; } if (!/^1\d{10}$/.test(data.mobile)) { ZENG.msgbox.show('手机格式错误', 5, 2000); $('#g_mobile').focus(); return false; } if($.trim(data.estate_title) == '') { ZENG.msgbox.show('意向楼盘不能为空', 5, 2000); $("#estate_title").focus(); return false; } $.getJSON('http://house.lanfw.com/common_bm.php?name='+data.name+'&type=1&mobile='+data.mobile+'&city_id='+data.city_id+'&estate_title='+data.estate_title+'&estate_id='+data.estate_id+'&terminal=pc&module=9&url='+data.this_url+'&op=add_tuan&callback=?', function(data){ if(data.type) { if (data.type) { ZENG.msgbox.show(data.msg, 4, 2000); document.getElementById("group_form").reset(); } } else { ZENG.msgbox.show(data.msg, 5, 2000); } }, "json"); }); });