如何隐藏Pocket Internet Explorer元素?

时间:2008-09-29 18:46:35

标签: .net javascript windows-mobile

如何在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' ? '-' : '+');
    }

1 个答案:

答案 0 :(得分:1)

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