[英]Jquery, Ajax, BeforeSend and Show
I've already searched on other questions but I can't find a good solution. 我已经搜索过其他问题,但是找不到合适的解决方案。 I use jQuery 1.11 to do an Ajax request.
我使用jQuery 1.11进行Ajax请求。 I want to show "caricamento7" (it's a <span> with an image and text) during the request and I punt .show() on BeforeSend but it doesn't work.
我想在请求过程中显示“ caricamento7”(带有图像和文本的<span>),然后在BeforeSend上展开.show(),但它不起作用。
If I put alert("bye")
it works! 如果我将
alert("bye")
为有效!
Thank you for your help 谢谢您的帮助
$.ajax({
url : "calcolo.php",
type: "GET",
data : {
dato1: $("#leva").val()
}
cache: false,
crossDomain: false,
dataType : "json",
timeout: 3000,
beforeSend: function () {
$("#caricamento7").show();
},
success: function(data) {...
dato1: $("#leva").val() //semicolon deleted
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.