English 中文(简体)
Jquery ajax打电话
原标题:Jquery ajax call not made

I am having problem with jquery that the ajax call is not made. Also the click should not get at the top of dom to trigger the hide af the .warning div.

我用火力看到,没有提出POST的要求。

这里是我的 j:

$(document).click(function(e) {
    if($( .warning ).hasClass("active"))
        $( .warning ).hide();
});

$( .ero ).click(function(e) {
    e.stopPropagation();
    e.preventDefault();
            $.ajax({
        type:  POST ,
        url:  /stem_op/3 ,
        data: {id: idv},
        success:function(msg){
        $( .warning ).fadeIn(500).css({
        display:  block ,
        position:  absolute ,
        left: position.left + 50,
        top: position.top - 25
    }).append(msg).addClass("active")}
        });      
});
最佳回答

Yeah,根据您的法典,如果将血清成分列入头部的话,就不存在。 如果没有,你的法律就立即执行。 由于你使用点击而不是代表,在处决时没有任何约束。

和前面的Dyer一样,将它总结为:

$(document).ready(function() {
   //code goes here
});

如果您有可能在用户互动的基础上与联合材料一起积极添加一个血清元素,那么你就希望使用

此外,click()基本上是一个捷径到bind()。 这样尝试并开始使用,至少使你能够把你的活动命名为空洞。 这使得具有约束力的、无约束力和重新具有约束力的活动处理者非常容易,而不影响可能利用相同事件处理这一要素的其他守则。

//instead of
$(".ero").click(function(e) { });

//something like this
$(".ero").bind("click.mynamespace", function(e) {
    //code here
});
问题回答

(美元)可能确实存在。 http://api.jquery.com/ready/rel=“nofollow”

$( .ero ).live( click , function() { ... }




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签