English 中文(简体)
Javascript issue that work in IE and not都灵
原标题:Javascript issue that works in IE and not Firefox

我正在遇到一个问题,那就是,在IE,但不是E,一个网页上工作。 “德布格尔”在以下线上停下来:

btnhelp = new button("btnhelp", framemenu.document.imghelp, "../images/gui/help_o.jpg", "../images/gui/help.jpg", "", "hand", true);

我认为,对纽顿的定义是另一个具有某些原型功能的类别:

function button(jscriptname, htmlobj, dnimg, dimimg, action, cursor, enabled, hlimg)
{
  //object for managing buttons easily
  this.img = htmlobj;

  if(htmlobj.name)
    this.name = htmlobj.name
  else if(htmlobj.id)
    this.name = htmlobj.id
  else
    this.name = "error";

  this.upimg = new Image();
  this.dnimg = new Image();
  this.dimimg = new Image();
  this.hlimg = new Image();

  this.upimg.src = this.img.src;
  this.dnimg.src = dnimg;
  this.dimimg.src = dimimg;
  if(hlimg)
    this.hlimg.src = hlimg;
  this.action = action;
  this.jscriptname = jscriptname;

  if(cursor)
    this.cursor = cursor;
  else
    this.cursor = "hand";

  if(enabled)
    this.enable();
  else
    this.disable();

  this.img.onclick= new Function(this.jscriptname + ".click();");
  this.img.onmouseover= new Function(this.jscriptname + ".mouseover();");
  this.img.onmouseout= new Function(this.jscriptname + ".mouseout();");
}

button.prototype.enable = _enable;
button.prototype.disable = _disable;
button.prototype.mouseover = _mouseover;
button.prototype.mouseout = _mouseout;
button.prototype.click = _click;
button.prototype.hilight = _hilight;

function _enable()
{
    this.img.src = this.upimg.src;
    this.img.style.cursor = this.cursor;
    this.enabled = true;    
}

function _disable()
{
    this.img.src = this.dimimg.src;
    this.img.style.cursor = "default";  
    this.enabled = false;
}

function _hilight(bool)
{
    this.img.src = this.hlimg.src;  
    this.enabled = bool;
}

function _mouseover()
{
    if(this.enabled)
        this.img.src = this.dnimg.src;
}

function _mouseout()
{
    if(this.enabled)
    {
        this.img.src = this.upimg.src;
    }
}

function _click()
{
    if(this.enabled)
        eval(this.action);

}

当浮标击中了Bthhelp = 新的纽顿线时,它接着是nsStore.js:

  handleEvent: function sss_handleEvent(aEvent) {

一旦它退出了这一职能,它就不再回到 Java文中,下行永远不会被叫去,因此,我认为,在呼吁建立一个新的 but子方面存在着问题。 是否有任何人知道我需要做些什么来解决这个问题?

最佳回答

如果是的话,它会停下来。

btnhelp = new button("btnhelp", framemenu.document.imghelp, "../images/gui/help_o.jpg", "../images/gui/help.jpg", "", "hand", true);

唯一可能的问题可以是button。 斜线尚未界定,或者存在问题,如<条码>框架>。 所有其他论点都是荒谬的,因此,我看不出为什么会与其中任何一个国家存在问题。

我的猜测——在没有任何比喻更多的信息的情况下,任何人都可以给你——问题在于:<条码>> 字典>是你文件中的一个要素,但事实上被定义为一个变数。 互联网探索者自动登记所有具有有效特性的元素,作为全球,可在无需使用<代码>的文件.getElementById(的情况下查阅。 没有任何其他浏览器,你必须使用<条码>文件.getElementById(,或采用其他某种形式的要素选择。

问题回答

暂无回答




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

热门标签