自定义H5页面dialog弹窗

弹窗一:

样式如下:

自定义H5页面dialog弹窗_第1张图片

HTML代码:

//弹出窗
	

通知

//遮罩层
JS代码:
function tipDialog(text){
		$('.dialog .content').text(text);
		$('.dialog, .mark').removeClass('hide');
	}
tipDialog( "1111");
$(".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');
	});



你可能感兴趣的:(dialog)