I am trying to use the jQuery POST function but it is handling the request in AJAX style. I mean it's not actually going to the page I am telling it to go.
$("#see_comments").click(function() {
$.post(
"comments.php",
{aid: imgnum},
function (data) {
}
);
});
此函数应转到comments.php页,且手头有援助值.它发布得很好,但不能重定向到comments.php.
@Doug Neiner澄清:
我有15个链接(图片).我点击一个链接,它就会加载我的JavaScript.脚本知道我打开了什么.这是我想要的comments.php中的
imgnum
.我必须使用这个JavaScript,没有其他方法可以做到这一点.JavaScript是必需的您的方法成功地发布了aid值.但在comments.php中,当我try echo 该值时,它什么也没有显示.
I am using Firebug. In the Console, it shows the echo REQUEST I made in Step (2) successfully.