【问题标题】:How to hide a Pocket Internet Explorer element?如何隐藏 Pocket Internet Explorer 元素?
【发布时间】:2008-09-29 18:46:35
【问题描述】:

如何在 Windows Mobile 6 设备上运行的 Pocket Internet Explorer 中隐藏 html 中的元素。即使正确设置值,以下代码也不起作用。

function ShowCollapseElement(sLinkId, sContentId)
    {
    var oLinkElement;
    var oContentElement;

    //Get the elements
    oLinkElement = document.getElementById(sLinkId);
    oContentElement = document.getElementById(sContentId);

    //Toggle the visibility of the content
    oContentElement.style.display = (oContentElement.style.display != 'none' ? 'none' : 'inline');

    //Set the link text
    oLinkElement.innerText = (oContentElement.style.display != 'none' ? '-' : '+');
    }

【问题讨论】:

    标签: .net javascript windows-mobile


    【解决方案1】:

    我刚刚发现当元素是 div 时代码可以工作,但不能用于表格行。我将不得不接受使用 div。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-03-03
      • 1970-01-01
      • 2020-02-12
      • 1970-01-01
      • 1970-01-01
      • 2016-04-22
      • 2010-12-06
      • 1970-01-01
      相关资源
      最近更新 更多