Javascript jax( { 网址:'http://localhost/tests/fullcalendar/change_title_rbs.php', 数据:'title='+title+'&id='+id, 键入:“POST”, 数据类型:“json” }); }; }, eventDrop:函数(事件、日增量、分钟增量、全天) { var start=event.start.format(); var end=(event.end==null)?开始:event.end.format(); $.ajax( { 网址:'http://localhost/tests/fullcalendar/update_events_rbs.php', 数据:'title='+event.title+'&start='+start+'&end='+end+'&id='+event.id, 类型:“职位” }); }, eventResize:函数(事件) { start=event.start.format(); end=event.end.format(); $.ajax( { 网址:'http://localhost/tests/fullcalendar/update_events_rbs.php', 数据:'title='+event.title+'&start='+start+'&end='+end+'&id='+event.id, 类型:“职位” }); } }); 函数isElemOverDiv() { var trashEl=jQuery('#trash'); var ofs=trashEl.offset(); var x1=ofs.左; var x2=ofs.left+trashEl.outerWidth(真); 变量y1=ofs.top; 变量y2=ofs.top+trashEl.outerHeight(真); 如果(currentMousePos.x>=x1&¤tMousePos.x=y1&¤tMousePos.y
1。 您可以使用Javascript jax( { 网址:'http://localhost/tests/fullcalendar/change_title_rbs.php', 数据:'title='+title+'&id='+id, 键入:“POST”, 数据类型:“json” }); }; }, eventDrop:函数(事件、日增量、分钟增量、全天) { var start=event.start.format(); var end=(event.end==null)?开始:event.end.format(); $.ajax( { 网址:'http://localhost/tests/fullcalendar/update_events_rbs.php', 数据:'title='+event.title+'&start='+start+'&end='+end+'&id='+event.id, 类型:“职位” }); }, eventResize:函数(事件) { start=event.start.format(); end=event.end.format(); $.ajax( { 网址:'http://localhost/tests/fullcalendar/update_events_rbs.php', 数据:'title='+event.title+'&start='+start+'&end='+end+'&id='+event.id, 类型:“职位” }); } }); 函数isElemOverDiv() { var trashEl=jQuery('#trash'); var ofs=trashEl.offset(); var x1=ofs.左; var x2=ofs.left+trashEl.outerWidth(真); 变量y1=ofs.top; 变量y2=ofs.top+trashEl.outerHeight(真); 如果(currentMousePos.x>=x1&¤tMousePos.x=y1&¤tMousePos.y,javascript,jquery,database,fullcalendar,background-color,Javascript,Jquery,Database,Fullcalendar,Background Color,1。 您可以使用eventDrop并在其中进行ajax调用,您可以使用 eventDrop: function( event, delta, revertFunc, jsEvent, ui, view){ ajax console.log(event.backgroundColor) } 二,。 爆米花 <?php $title=$_POST['title']; $start=$_POST['start']; $end=$_POST['end']
eventDrop
并在其中进行ajax调用,您可以使用
eventDrop: function( event, delta, revertFunc, jsEvent, ui, view){
ajax
console.log(event.backgroundColor)
}
二,。
爆米花
<?php
$title=$_POST['title'];
$start=$_POST['start'];
$end=$_POST['end'];
$backgroundColor=$_POST['backgroundColor'];
// connexion à la base de données
try
{
$bdd = new PDO('mysql:host=localhost;dbname=pva_test1', 'root', '');
}
catch(Exception $e)
{
exit('Impossible de se connecter à la base de données.');
}
$sql = "INSERT INTO planning_rbs (title, start, end, backgroundColor) VALUES (:title, :start, :end, :backgroundColor)";
$q = $bdd->prepare($sql);
$q->execute(array(':title'=>$title, ':start'=>$start, ':end'=>$end, ':backgroundColor'=>$backgroundColor));
?>
eventDrop: function( event, delta, revertFunc, jsEvent, ui, view){
ajax
console.log(event.backgroundColor)
}
eventRender: function( event, element, view ) {
element.popover({
title: event.title,
container: 'body',
placement: 'auto',
html: true,
content: 'your content'
})
}