English 中文(简体)
inside在产生<a href...>的j Query内传承功能
原标题:Calling a JavaScript function inside a jQuery generated <a href...>

I have a problem with this piece of code:

$(document).ready(function() {

    $( .notActiveId ).change(function() {

        if ($(this).attr( value ).length === 0 ) {

            $("#notActiveButton").html(  );

        } else {

            $("#notActiveButton").html( <a href="javascript:void(0)" onClick="setStatus(  + $(this).attr( value ) +  , activate)" class="operationUnlock" >Activate</a> );

        }

    });
});

缩略语 活性Id。 但是,问题在于如何在<条形码>上写<代码>$>(本件)。attr(价值),因为我选定的数值是:RZT_83848Rer。 (因此包括特性、强调和编号)。

如果我试图如上所述写字,那么我就错了 Java文。

问题回答

为什么不使用旧学校的“立克”,为什么不通过 j子添加贵元素?

$( #notActiveButton ).empty().append($( <a/> , {
  href:  # , // the "javascript:" thing is basically bogus and unnecessary
  click: function () {
    setStatus(this.value, activate);
  },
  class:  operationUnlock ,
  text:  Activate 
}));

现在,所有这些假设都假定,你的“并非实际的Button”元素是贵方的<代码>和t;a>的某种合法集装箱。 但不管怎么说,这样,你就可以在不必担心引人之味的情况下,写明简明的 Java。





相关问题
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.

热门标签