本文介绍了如何将数据发布到javascript函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! hay。 我正在使用fullcalender应用程序,当用户点击日期时,它使用(Bootstrape)显示模型。我想将数据发送到fullcalender的功能。hay.i am using fullcalender application and when user click on the date its shows a model using(Bootstrape). i want to send data to fullcalender's function. select: function(start, end, allDay) {// old code start //var title = prompt('Event Title:'); //var url = prompt('Type Event url, if exits:');//old code end// my code start$('#events').modal('show');// end //old//if (title) {// var start = $.fullCalendar.formatDate(start, "yyyy-MM-dd HH:mm:ss"); var end = $.fullCalendar.formatDate(end, "yyyy-MM-dd HH:mm:ss"); var id=<?php echo $id; ?>; $.ajax({ url: 'add_events.php', data: 'title='+ title+'&start='+ start +'&end='+ end +'&url='+ url +'id'+id , type: "POST", success: function(json) { alert('Added Successfully'); // } 这是表格 b $ band this is form<form action="" method="post" ><!-- Modal --><div id="events" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3 id="myModalLabel">Modal header</h3></div><div class="modal-body"><p><table><tr><td><input type="text" name="name" placeholder="event name"></td></tr><tr><td><input type="text" name="note" placeholder="event note"></td></tr><tr><td>email to: <?phpinclude 'chkuser.php';echo $username;?></td></tr><tr><td><input type="email" name="email"></td></tr></table></p></div><div class="modal-footer"><button class="btn" data-dismiss="modal" aria-hidden="true">Close</button><button class="btn btn-primary" name="btn2">Save changes</button></div></div></form> 我应该怎么做用于将数据发送到该函数what should i use to send the data to that function推荐答案(' #events')。modal(' show'); // end / / 旧 // if(title){ // var start =('#events').modal('show');// end //old//if (title) {// var start = .fullCalendar.formatDate(start, yyyy-MM-dd HH:mm:ss); var end =.fullCalendar.formatDate(start, "yyyy-MM-dd HH:mm:ss"); var end = .fullCalendar.formatDate(end, yyyy-MM-dd HH:mm:ss); var id =<?php echo.fullCalendar.formatDate(end, "yyyy-MM-dd HH:mm:ss"); var id=<?php echo 这篇关于如何将数据发布到javascript函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!