控制div层的显示以及隐藏

控制div层的显示以及隐藏,例如,点击登录,弹出登录的层。

1、添加script代码

<script>
        function add_address(){
            $('#popup2').show();
            $('#gray').show();
        }
        function closeAddressDiv(){
            $('#popup2').hide();
        }
    </script>

2、在body标签里面添加如下的div

<div class="popup2" id="popup2">
    <div class="top_nav" id='top_nav2'>
        <div align="center">
            <span>新增收货地址</span>
            <a class="guanbi" href="javascript:void(0);" onclick="closeAddressDiv()"></a>
        </div>
    </div>

    <table cellpadding="0" cellspacing="0" class="my_address2">
        <tr>
            <th><span class="red">*</span>所在地区:</th>
            <td><input type="text" class="text_input" placeholder="请选择省市区">
            </td>
        </tr>
        <tr>
            <th><span class="red">*</span>详细地址:</th>
            <td><input type="text" class="text_input long" placeholder="建议您如实填写详细地址,例如街道名称、门牌号码、楼层和房间号等信息">  </td>
        </tr>
        <tr>
            <th><span class="red">*</span>邮政编码:</th>
            <td><input type="text" class="text_input" placeholder="如您不清楚邮递编号,请填写000000">    </td>
        </tr>
        <tr>
            <th><span class="red">*</span>收货人姓名:</th>
            <td><input type="text" class="text_input" placeholder="长度不超过25个字符">     </td>
        </tr>
        <tr>
            <th><span class="red">*</span>手机号码:</th>
            <td>
                <select name="select" id="select" class="select_form">
                    <option >中国大陆 +86</option>
                </select>
                <input type="text" class="text_input" placeholder="手机号码、电话号码必须填一项">
   </td> </tr> <tr> <th>电话号码:</th> <td> <select name="select" id="select" class="select_form"> <option >中国大陆 +86</option> </select> <input type="text" class="text_input small1" placeholder="区号"> - <input type="text" class="text_input small2" placeholder="电话号码"> - <input type="text" class="text_input small3" placeholder="分机号"> </td> </tr> <tr> <th></th> <td><input type="checkbox" checked> 设为默认收货地址</td> </tr> <tr> <th></th> <td><input type="submit" class="but_input" value="保 存"></td> </tr> </table> </div>

 

转载于:https://www.cnblogs.com/pheosia/p/6515838.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值