خرید بک لینک

Vote count: 0

I am trying to detected the height of the window (and the width but that is unrelated here) and then reduce the height by 60px and then use those values later in my JS.

ar w = Math.max(document.documentElement.clientWidth, window.ierWidth || 0)
    var h = Math.max(document.documentElement.clientHeight, window.ierHeight || 0)
    var hAdjusted = h - 60;

And then use it here

document.getElementById('canvas__container').ierHTML = "<canvas id="canvas" width="" + w + "" height="" + hAdjusted + ""></canvas>";

However it does not work, I must be making a basic mistake that is too obvious I can't see it, but I've been stuck for ages now and it's driving me nuts!

hAdjusted is still making the canvas full height.

asked 43 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 28 خرداد 1395 ساعت: 22:45

صفحه بندی