未捕获的TypeError:无法读取属性' style' of nullsetWrap

时间:2016-04-21 07:26:11

标签: javascript

排队问题。

public void siftDown(Node<V> n) {
    Node<V> current = n;
    boolean notDone = true;
    while (notDone) {
        if (!current.isLeaf()) {
            current = n;
            if ((current.data.compareTo(current.left.data) < 0)
                    && (current.left.data.compareTo(current.right.data) >= 0)) {
                swapValues(current, current.left);
                current = current.left;
            } else if ((current.data.compareTo(current.right.data) < 0)
                    && (current.right.data.compareTo(current.left.data) > 0)) {
                swapValues(current, current.right);
                current = current.right;
                if (current.isLeaf()) {
                    notDone = false;
                }
            }
        } else {
            notDone = false;
        }    
    }    
}    

public void swapValues(Node<V> x, Node<V> y) {     
    V temp = x.data;
    x.data = y.data;
    y.data = temp;
}

public boolean isLeaf() { //inside my node class
    if (left == null && right == null)
        return true;
    else
        return false;
}

功能:

wrapElement.style.height = windowHeight + "px";

1 个答案:

答案 0 :(得分:-1)

  

好像它没有找到带有ID&#34;容器&#34;的元素。确保HTML中包含此ID的标记。 - Adrien Brunelat