' + '' + '', buttons: { formSubmit: { text: '提交', btnClass: 'btn-blue', action: function () { var name = this.$content.find('.name').val(); if(!name){ $.alert('请您输入您的姓名'); return false; } $.alert('您的姓名是: ' + name); } }, cancel: { text: '取消' }, }, onContentReady: function () { var jc = this; this.$content.find('form').on('submit', function (e) { e.preventDefault(); jc.$$formSubmit.trigger('click'); }); } });});$('.example-p-4').on('click', function () { $.confirm({ title: '错误提示', content: '笑江湖浪迹十年游,空负少年头。对铜驼巷陌,吟情渺渺,心事悠悠!酒冷诗残梦断,南国正清秋。', type: 'red', typeAnimated: true, buttons: { tryAgain: { text: '重试', btnClass: 'btn-red', action: function(){ } }, close: { text: '关闭' } } });});$('.example-p-5').on('click', function () { $.confirm({ title: '成功', content: '难消受灯昏罗帐,怅昙花一现恨难休!飘零惯,金戈铁马,拼葬荒丘!', type: 'green', buttons: { omg: { text: '谢谢', btnClass: 'btn-green', }, close: { text: '关闭', } } });});$('.example-p-6').on('click', function () { $.confirm({ title: '警告', content: '把剑凄然望,无处招归舟。明日天涯路远,问谁留楚佩,弄影中洲?数英雄儿女,俯仰古今愁。', type: 'orange', typeAnimated: false, buttons: { omg: { text: '重试', btnClass: 'btn-orange', }, close: { text: '关闭', } } });});