English 中文(简体)
• 如何压倒富人的改良方法和标志: 方框java
原标题:How to override markPrevious and markNext methods on rich:suggestionBox javascript

我有一项要求,即用户应当能够从第一个到最后一个富裕的物品中航行: 方框中列出了关键因素,反之亦然。

我需要把这项工作放在丰富内容3.3.x上。

争取做到这一点,使我产生了富国背后的 j印:ug。 可在。 有关方法如下:markPrevious()markNext()<>。

这就是如何在选择上加以定义。 基础:

markPrevious: function() {
    if (this.index > 0) this.index--;
    //else this.index = this.entryCount - 1;
},

markNext: function() {
    if (this.index < this.entryCount - 1) this.index++;
    //else this.index = 0;
},

你可以看到,我所需要的功能是在那里,但出于某种原因,他们把它放在了评论中。 因此,我试图通过在我的模板档案中把以下 j字放在我所有网页上来,来推翻这些方法:

<script type="text/javascript">
    //<![CDATA[

    if(Suggestion) {
        function newMarkPrevious() {
            if (this.index > 0) this.index--;
            else this.index = this.entryCount - 1;
        }

        function newMarkNext() {
            if (this.index < this.entryCount - 1) this.index++;
            else this.index = 0;
        }

        Suggestion.Base.prototype.markPrevious = newMarkPrevious;
        Suggestion.Base.prototype.markNext = newMarkNext;
      }
    //]]>
    </script>

现在,如果我用火力检查Suggestion<>m>的物体,我就可以看到,这些方法确实是压倒一切的。 然而,所有财富:拥抱 我的网页上的方框仍然使用旧的版本。 因此,我认为,有些东西是富国背后的目标:建议 箱子在之前就已创建。 我高于原型。 而这正是我 st的。 我不知道我如何能够在<><>之前获得我的版本。 这些建议 箱子已经创建。

是否有人想如何解决这一问题?

感谢

Kim。

P.S.,我相信,还可以选择直接在富足的杰尔调整该守则,但我不想有一条习惯。

最佳回答
问题回答

也许你们可以把4j放在一起:这一富人的支助部分: 建议 锡瓦文 要求使用javascript功能的事件手:

function KeyCheck(e) {

   var KeyID = (window.event) ? event.keyCode : e.keyCode;
   switch(KeyID) {
     case 1:
         markNext function
         break;
     case 2:
         markPrevious function
         break;
   }
}




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