window.onload = function () { // 省市区回显 if($('#provinceHide').val() != ''){ $("#province10").val($('#provinceHide').val()); $("#province10").trigger("change"); $("#city10").val($('#cityHide').val()); $("#city10").trigger("change"); $("#district10").val($('#areaHide').val()); $("#district10").trigger("change"); } if ($('.content').height() > 750) { $('#iframe-main', parent.document).css('height', $('.content').height() + 20) } else { $('#iframe-main', parent.document).css('height', '750px') } var group_name = $('#group_name').val(); $('#user_groups option').each(function(){ if($(this).html() == group_name){ $(this).attr("selected", true); } }) if($('#user_logo').val() != 'None'){ var groupsSelect = $('#user_logo').val() }else{ var groupsSelect = 0 } $('#user_groups').val(groupsSelect) } $('#email').on('click',function(){ layer.msg("邮箱地址禁止修改!"); }) $('#username').on('click',function(){ layer.msg("用户名禁止修改!"); }) function sub() { var username = $("#username").val(); // var email = $("#useremail").val(); var user_phone = $("#userphone").val(); var province = $("#province10").val(); var city = $("#city10").val(); var area = $("#district10").val(); var remark = $("#userremark").val(); var type = $("#user_type").val(); if (username == "") { layer.msg("请将信息填写完整!", { time: 2000 }); return false; }else if (user_phone != "") { var user_phoneRegexp = /^1[3|4|5|8][0-9]\d{4,8}$/; var strPhone = user_phoneRegexp.test(user_phone); if (strPhone != true) { layer.msg("手机格式不正确!!!", { time: 2000 }); return false; } }else{ return true; } }