Skip to content


Navigatzailearen zabalera jaso

Ez dut gogoan nondik atera nuen kode hau, baina or doa, behar duenarentzako.

function NabZabalera() {
    if (self.innerHeight) { // MOS
        y = self.innerHeight;
        x = self.innerWidth;
    } else if (document.documentElement && document.documentElement.clientWidth) { // IE6 Strict
        x = document.documentElement.clientWidth;
        y = document.documentElement.clientHeight;
    } else if (document.body.clientHeight) { // IE quirks
        y = document.body.clientHeight;
        x = document.body.clientWidth;
    }
    return {x: x, y: y};
}

Posted in Javascript.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.