点击添加表格,修改ID和type,功能


<!DOCTYPE html>
<html lang="en">
<head>

<title>店主信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link rel="stylesheet" type="text/css" href="../../resources/css/loanDetail.css" />

</head>
<body>
<input type="hidden" id="projectId" value="${projectId}"></input>
<input type="hidden" id="bossinfoId"></input>
<input type="hidden" id="propertyId"></input>
<input type="hidden" id="carId"></input>
<div id="wrapper">
    <!-- Navigation -->
    <jsp:include page="/page/common/menu.jsp" >
        <jsp:param value="2" name="menu"/>
        <jsp:param value="1" name="index"/>
    </jsp:include>
    <div id="page-wrapper">
        <div class="container-fluid">

            <!-- Page Heading -->
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">
                                
                     </h1>
                </div>
            </div>
<!-- /.row -->
<div class="row">
    <div class="container-fluid">
        
        <!--修改的内容-->
        <div class="contain-table"> 
            <div >
                基本信息
                <!--点击添加的标签-->
                <span class="add-basic"><i class="add-info  cancel"></i><i class="change-cont">添加</i></span>
            </div>
            <div class="complete-info" id="complete-info"> 
                <div class="table-basic">
                    <table border="1" class="basic-info" id="basic">
                        <tr>
                            <th>信息项</th>
                            <th>信息内容</th>                                                                       
                        </tr>
                        <tr>
                            <td>姓名</td>
                            <td><input type="text" placeholder="请输入" id="name"/></td>                                   
                        </tr>
                        <tr>
                            <td>电话</td>
                            <td><input type="text" placeholder="请输入" id = "phone"/></td>                                                    
                        </tr>
                        <tr>
                            <td>股份占比</td>
                            <td> <input type="text" placeholder="请输入" id = "shares"/></td>                                                  
                        </tr>
                        <tr>
                            <td>身份证号</td>
                            <td><input type="text" placeholder="请输入" id = "identityCard"/></td>                                                 
                        </tr>
                        <tr>
                            <td>身份证正面</td>
                            <td>
                                <div class="table-td">
                                    <input type="file" accept="image/*"/>
                                    <a><img  class = "verifyPic" src="http://file.88mmmoney.com/49536eb9-1aff-477a-8d43-e08910819608" id = "identityCardFrontPic"/></a>                                                                 
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>身份证背面</td>
                            <td>
                                <div class="table-td">
                                    <input type="file" accept="image/*"/>
                                    <a><img  class = "verifyPic" src="http://file.88mmmoney.com/49536eb9-1aff-477a-8d43-e08910819608" id = "identityCardBackPic"/></a>                                                                  
                                </div> 
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>现在住址</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "livingAddress"/>
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>户口所在地</td>
                            <td>
                                 <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "residenceAddress"/>
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>学历</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "education"/>
                                </div> 
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>毕业院校</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "school"/>
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>毕业证</td>
                            <td>
                                <div class="table-td">
                                    <input type="file" accept="image/*"/>
                                    <a><img  class = "verifyPic" src="http://file.88mmmoney.com/49536eb9-1aff-477a-8d43-e08910819608" id = "diplomaPic"/></a>                                                                   
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>学位证</td>
                            <td>
                                <div class="table-td">
                                    <input type="file" accept="image/*"/>
                                    <a><img  class = "verifyPic" src="http://file.88mmmoney.com/49536eb9-1aff-477a-8d43-e08910819608" id = "degreePic"/></a>                                                                    
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>专业</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "major"/>
                                </div> 
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>是否缴纳社保</td>
                            <td>
                                <div class="table-td">
                                    <input   type="radio"  name="socialSecurity" value="yes"/><label class="one">是</label>
                                    <input  type="radio"  name="socialSecurity" value="no"/><label class="two">否</label>
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>缴纳社保年限</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "socialSecurityYear"/>
                                </div> 
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>婚姻情况</td>
                            <td>
                                <div class="table-td">
                                    <input   type="radio"  name="marriage" value="married"/><label class="one">已婚</label>
                                    <input  type="radio"  name="marriage" value="single"/><label class="two">未婚</label>
                                    <input  type="radio"  name="marriage" value="divorced"/><label class="two">离异</label>
                                </div> 
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>结婚证</td>
                            <td>
                                <div class="table-td">
                                    <input type="file" accept="image/*"/>
                                    <a><img  class = "verifyPic" src="http://file.88mmmoney.com/49536eb9-1aff-477a-8d43-e08910819608" id = "marriageCertificatePic"/></a>                                                                   
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>配偶姓名</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "spouseName"/>
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>配偶联系方式</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "spouseContact"/>
                                </div>
                            </td>  
                        </tr>
                        <tr>
                            <td>配偶身份证号</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "spouseIDCard"/>
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>配偶身份证正面</td>
                            <td>
                                <div class="table-td">
                                    <input type="file" accept="image/*"/>
                                    <a><img  class = "verifyPic" src="http://file.88mmmoney.com/49536eb9-1aff-477a-8d43-e08910819608" id = "spouseIDCardFrontPic"/></a>                                                                 
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>配偶身份证背面</td>
                            <td>
                                <div class="table-td">
                                    <input type="file" accept="image/*"/>
                                    <a><img  class = "verifyPic" src="http://file.88mmmoney.com/49536eb9-1aff-477a-8d43-e08910819608" id = "spouseIDCardBackPic"/></a>                                                                  
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>是否生育</td>
                            <td>
                                <div class="table-td">
                                    <input   type="radio"  name="giveBirth" value="yes"/><label class="one">是</label>
                                    <input  type="radio"  name="giveBirth" value="no"/><label class="two">否</label>
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>子女数量</td>
                            <td>
                                <div class="table-td">
                                    <input type="number" placeholder="请输入" id = "childrenNum"/><span>人</span>
                                </div> 
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>子女户口页资料</td>
                            <td>
                                <div class="table-td">
                                    <input type="file" accept="image/*"/>
                                    <a><img  class = "verifyPic" src="http://file.88mmmoney.com/49536eb9-1aff-477a-8d43-e08910819608" id = "childrenResidencePic"/></a>
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>全国法院被执行人信息查询</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "executionInfo"/>
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>被执行人信息查询照片</td>
                            <td>
                                <div class="table-td">
                                    <input type="file" accept="image/*"/>
                                    <a><img  class = "verifyPic" src="http://file.88mmmoney.com/49536eb9-1aff-477a-8d43-e08910819608" id = "executionInfoPic"/></a>
                                </div> 
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>深圳法院网上诉讼平台查询</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "litigationInfo"/>
                                </div>
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>诉讼信息查询照片</td>
                            <td>
                                <div class="table-td">
                                    <input type="file" accept="image/*"/>
                                    <a><img  class = "verifyPic" src="http://file.88mmmoney.com/49536eb9-1aff-477a-8d43-e08910819608" id = "litigationInfoPic"/></a>
                                </div> 
                            </td>                                                   
                        </tr>
                        <tr>
                            <td>从业经历</td>
                            <td>
                                <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "workingExperience"/>
                                </div>
                            </td>                                                   
                        </tr>
                        
                    </table>                                                                       
                    <button type="button" id="submit">保存</button>
                </div>
                <div class="house" id="realEstate">
                    <div class="">  
                        房产/其他资产
                        <span class="add-house"><i class="add-info  cancel-house"></i><i class="change-cont">添加</i></span>
                        
                    </div>
                    <div class="table-house" id="house-info">
                        <table border="1" class="house-info">
                            <tr>
                                <td>类型</td>
                                <td>
                                    <div class="table-td">
                                        <input type="text" placeholder="请输入" id = "propertyType"/>
                                    </div>
                                </td>                   
                            </tr>
                            <tr>
                                <td>物业名称</td>
                                <td>
                                    <div class="table-td">
                                        <input type="text" placeholder="请输入" id = "propertyName"/>
                                    </div>
                                </td>                   
                            </tr>
                            <tr>
                                <td>物业地址</td>
                                <td>
                                    <div class="table-td">
                                        <input type="text" placeholder="请输入" id = "propertyAddress"/>
                                    </div>
                                </td>                   
                            </tr>
                            <tr>
                                <td>面积</td>
                                <td>
                                    <div class="table-td">
                                        <input type="text" placeholder="请输入" id = "propertyArea"/>
                                    </div> 
                                </td>                   
                            </tr>
                            <tr>
                                <td>购入日期</td>
                                <td>
                                    <div class="table-td">
                                        <input type="text" placeholder="请输入" id = "propertyPurchaseDate"/>
                                   </div>
                                </td>               
                            </tr>
                            <tr>
                                <td>购买价</td>
                                <td>
                                    <div class="table-td">
                                        <input type="number" placeholder="请输入" id = "propertyPurchasePrice"/>
                                    </div> 
                                </td>                   
                            </tr>
                            <tr>
                                <td>评估价</td>
                                <td>
                                     <div class="table-td">
                                        <input type="number" placeholder="请输入" id = "propertyEvaluatePrice"/>
                                    </div>
                                </td>                   
                            </tr>
                            <tr>
                                <td>抵质押、借款情况</td>
                                <td>
                                    <div class="table-td">
                                        <input type="text" placeholder="请输入" id = "propertyPledge"/>
                                    </div>
                                </td>                   
                            </tr>
                            
                        </table>
                        <button type="button" id="submit">保存</button>
                        
                    </div>

                </div>
               
                <div class="car">
                <!--//  车产信息-->
                    <div class="">  
                        车产
                        <span class="add-car"><i class="add-info cancel"></i><i class="change-cont">添加</i></span>                       
                    </div>
                    <div class="table-car" id="carProperty">
                        <table border="1" class="car-info">
                            <tr>
                                <td>品牌</td>
                                <td>
                                    <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "carBrand"/>
                                </div>
                                </td>
                            </tr>
                            <tr>
                                <td>型号</td>
                                <td>
                                    <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "carModel"/>
                                </div>
                                </td>                   
                            </tr>
                            <tr>
                                <td>车牌号</td>
                                <td>
                                    <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "carLicensePlate"/>
                                </div>
                                </td>                   
                            </tr>
                            <tr>
                                <td>发动机号</td>
                                <td>
                                    <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "carEngineNum"/>
                                </div>
                                </td>                   
                            </tr>
                            <tr>
                                <td>车架号</td>
                                <td>
                                    <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "carChassisNum"/>
                                </div>
                                </td>               
                            </tr>
                            <tr>
                                <td>购入日期</td>
                                <td>
                                     <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "carPurchaseDate"/>
                                </div>
                                </td>                   
                            </tr>
                            <tr>
                                <td>购买价</td>
                                <td>
                                    <div class="table-td">
                                    <input type="number" placeholder="请输入" id = "carPurchasePrice"/>
                                </div>
                                </td>                   
                            </tr>
                            <tr>
                                <td>评估价</td>
                                <td>
                                    <div class="table-td">
                                    <input type="number" placeholder="请输入" id = "carEvaluatePrice"/>
                                </div>
                                </td>                   
                            </tr>
                            <tr>
                                <td>抵质押、借款情况</td>
                                <td>
                                    <div class="table-td">
                                    <input type="text" placeholder="请输入" id = "carPledge"/>
                                </div>
                                </td>                   
                            </tr>
        
                        </table>
                        <button type="button" id="submit">保存</button>
                        
                    </div>

                </div>       
                                                      
            </div> 
            
            
        </div>
        <div >          
            <div >      
                <input type="button" id="prev" value="<<上一页"/>                  
                <button type="button" id="next">下一页>></button>
            </div>
        </div> 
                    
        <br/>
        <br/>
    </div>
    <!-- /.container-fluid -->
</div>
    <!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->

</body>
<!--<%@include file="/page/common/foot.jsp" %>-->

<!--<script src="${pageContext.request.contextPath}/resources/js/loanproject/bossinfo.js" type="text/javascript" charset="utf-8"></script>-->
<script src="../../resources/js/loanproject/bossinfo.js" type="text/javascript" charset="utf-8"></script>
<script src="../../resources/js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>   
<script>
$(document).ready(function(){
    
    init();
    
    //给新表单中所有的input标签的id加上数字
    var completeId = 1; 
    var houseId = 1;
    var carId = 1;
    var houseCount = 1;
    var basicCount = 1;
    var carCount = 1;
        //添加基本信息表单
    $('span.add-basic').click(function(){
        var basicIdName = "complete-info"+completeId;
        $(".contain-table").append($(".complete-info").eq(0).clone().attr('id',basicIdName));   
        $('#'+basicIdName+' input').val('');            
        $('#'+basicIdName+' input').each(function(){
            var inputId = $(this).attr('id')+basicCount;
            $(this).attr('id',inputId);         
        })  
        basicCount += 1;
        completeId += 1;            
    })  
        //添加房产信息表单
    $('span.add-house').click(function(){           
        var houseIdName = "house-info"+houseId;         
        $(".house").append($(".table-house").eq(0).clone().attr('id',houseIdName)); 
        $('#'+houseIdName+' input').val('');            
        $('#'+houseIdName+' input').each(function(){
            var houseInputId = $(this).attr('id')+houseCount;                                   
            $(this).attr('id',houseInputId);                
        })  
        houseCount += 1;
        houseId += 1;
    })      
        //添加车产信息表单
    $('span.add-car').click(function(){         
        var carIdName = "house-info"+carId;         
        $(".car").append($(".table-car").eq(0).clone().attr('id',carIdName));   
        $('#'+carIdName+' input').val('');          
        $('#'+carIdName+' input').each(function(){
            var carInputId = $(this).attr('id')+carCount;                                   
            $(this).attr('id',carInputId);              
        })  
        carCount += 1;
        carId += 1;         
    })
    
    $('span.add-car').click(function(){         
        var carIdName = "house-info"+carId;         
        $(".car").append($(".table-car").eq(0).clone().attr('id',carIdName));   
        $('#'+carIdName+' input').val('');          
        $('#'+carIdName+' input').each(function(){
            var carInputId = $(this).attr('id')+carCount;                                   
            $(this).attr('id',carInputId);              
        })  
        carCount += 1;
        carId += 1;         
    })
    console.log($("input[type='radio']").length);

  });
    
</script>

</html>

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,142评论 6 498
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,298评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 162,068评论 0 351
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,081评论 1 291
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,099评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,071评论 1 295
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,990评论 3 417
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,832评论 0 273
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,274评论 1 310
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,488评论 2 331
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,649评论 1 347
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,378评论 5 343
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,979评论 3 325
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,625评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,796评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,643评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,545评论 2 352

推荐阅读更多精彩内容