就那么几行代码,但是总是提示脚本错误。虽然在web上浏览不影响使用,但是我嵌入到exe内部之后每次都会弹出提示,大家看下代码哪里有问题?
代码如下:
if (mon=="200")
{
parent.slowAmount.innerText = '200';
}

解决方案 »

  1.   

    parent.document.getElement("slowAmount").innerText='200'
      

  2.   

    parent.document.getElementById("slowAmount").innerHTML='200'
    innerText有点兼容性问题
      

  3.   

    window.parent.document.getElement("slowAmount").innerText='200'
    or
    window.parent.document.getElement("slowAmount").innerHTML='200'
    ff : window.parent.document.getElement("slowAmount").textContent='200'