我想用cat EOL创建一个脚本但是当我在终端中粘贴代码时会挂起错误:cat: - :输入/输出错误。 我只希望脚本的粘贴内容不执行grep命令。这一行给了我一些问题
],
eventClick: function(event) {
console.log(event)
// alert(event.start.format('MMMM Do YYYY'))
var start = event.start.format('MMMM Do YYYY'),
end = event.end.format('MMMM Do YYYY'),
html = '<p>Starts: ' + start + '<p>';
html += '<p>Ends: ' + end + '<p>';
var modal = $("#modal");
modal.find(".modal-title").html(event.title);
modal.find('.modal-body').html(html)
modal.modal();
}
});
});
});//]]>
jQuery(function($)
{
$("#contact_form").submit(function()
{
var content = $("modal").text();
var email = $("#email").val(); // get email field value
var name = $("#name").val(); // get name field value
var msg = $("#msg").val(); // get message field value
$.ajax(
{
type: "POST",
url: "https://mandrillapp.com/api/1.0/messages/send.json",
data: {
'key': 'API',
'message': {
'from_email': "email@email.com",
'from_name': "name",
'headers': {
'Reply-To': "email@emailcom"
},
'subject': 'Confirmation - Sign Up',
'text': modal,
'to': [
{
'email': email,
'name': name,
'type': 'to'
}]
}
}
})
.done(function(response) {
alert('You have been signed up. Thank you!'); // show success message
$("#name").val(''); // reset field after successful submission
$("#email").val(''); // reset field after successful submission
$("#msg").val(''); // reset field after successful submission
var content = $("modal").text();
document.writeln(content);
})
.fail(function(response) {
alert('Error sending message.');
});