赞
踩
弹窗一:
样式如下:
HTML代码:
- //弹出窗
- <div class="dialog hide">
- <p class="title tc">通知</p>
- <section class="content"></section>
- <div class="dialog-footer">
- <button type="button" type="button" class="dialog-btn cancel">取消</button>
- <button type="button" type="button" class="dialog-btn sure">确认</button>
- </div>
- </div>
- //遮罩层
- <div class="mark hide"></div>
JS代码:
- function tipDialog(text){
- $('.dialog .content').text(text);
- $('.dialog, .mark').removeClass('hide');
- }
- $(".sure").click(function(){
- var type= $(this).attr('type');
- if(type==='bind'){
- var link = '/home/employee/employeeBindCompany';
- }else{
- var link = '/home/employee/employeeUpdateCompany';
- }
- $.ajax({
- type: 'POST',
- url: url + link,
- dataType: 'json',
- contentType: "application/json",//;charset=utf-8
- data: JSON.stringify({
- "phone": phone,
- "companyId": parseInt(companyId,10)
- }),
- success: function (res) {
- window.location.href="success.html"
- }
- });
- });
- $('.cancel').click(function(){
- $('.dialog, .mark').addClass('hide');
- });
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。