---
# System prepended metadata

title: sweetalert2

---

# sweetalert2

<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>


$(document).ready(function(){
		const swalWithBootstrapButtons = Swal.mixin({
			  customClass: {
			    confirmButton: 'btn btn-success',
			    cancelButton: 'btn btn-danger'
			  },
			  buttonsStyling: false
			});
		$("#insertBtn").click(function(e){
			e.preventDefault();
			swalWithBootstrapButtons.fire({
				title:'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;請再次確認',
				text:'課程欲售點數 與 課程堂數 新增後不可修改',
				icon:'warning',
				showCancelButton: true,
				dangerMode:false,
				  confirmButtonText: '下一步',
				  cancelButtonText: '取消!',
				  reverseButtons: true
			}).then((result) => {
				  if (result.value) {
					  $("#insertBtn").parent().submit();
			}
		});
	});
	});