【发布时间】:2015-04-16 18:51:43
【问题描述】:
我在服务器上有一些我想在对话框中打印的数据,我想要的是以下内容。
$(function() {
$("#checkreservatoion").click(function() {
// getting selected date
var selected_date = $("#sd").val();
// getting route details
var selected_route = $("#route option:selected").val();
// getting the details of seats
var selected_sites = $("#qty option:selected").text();
$.post("abc.php", {
date: selected_date,
route: selected_route,
seats: selected_sites
}, function(ajaxresult) {
//getting ajax result and printing as html
$("#postrequest").html(ajaxresult);
});
});
});
但是这段代码不起作用,#postrequest 是 jQuery 插件模型的 div。
【问题讨论】:
-
请重新组织您的代码。
-
您还应该说明具体问题是什么。
-
这里的反对票有点苛刻。我见过比这个更糟糕的问题。
-
user1468327,如果您在发布之前花时间格式化您的代码,您本可以为自己节省很多很多反对票。
-
好的,我明白了。下次我会记住的