したがって、基本的に画面上の要素の位置を調整する次のスクリプトがあります。
他のブラウザでは問題なく動作しますが、IE8 ではエラーが発生します
問題を引き起こす関数呼び出し全体を次に示します。
function ajax_load(){
var screenwidth = window.innerWidth
var screenheight = window.innerHeight;
var current_width = 250;
var current_height = 70;
var left = (screenwidth - current_width)/2;
var bottom = (screenheight - current_height)/2;
var secondajaxloaderElement = document.getElementById('ajax_loader');
secondajaxloaderElement.style.bottom = bottom + 'px'; // Line 308 - problematic line
secondajaxloaderElement.style.left = left + 'px';
}
なぜこれが IE で失敗するのでしょうか?
開発者ツールから取得したエラーは次のとおりです:無効な引数。および行番号 (308) を指す
secondajaxloaderElement.style.bottom = bottom + 'px';