次のJavaScriptコードがあります:
function createDiv(id){
var temp = document.createElement('div');
temp.setAttribute("id", id);
document.getElementsByTagName('body')[0].appendChild(temp);
}
createDiv('upper_outer');
function /*ABSTRACTION*/(e)
{
/* Part not shown of the function is working correctly */
var upper = document.getElementById("upper_outer");
upper.style.display = "block";
upper.style.position = "absolute";
upper.style.height = $(document).height() - init_co[0] + "px";
upper.style.width = s_box.style.width + "px";
upper.style.left = init_co[0] + "px";
upper.style.top = init_co[1] + "px";
}
開発コンソールでは、div が実際に適切な ID で作成されていることを確認できますが、スタイル属性に関して想定される変更はありません。これに関するアイデアはありますか?(このコードに表示されていない変数は無視してください。正しく実装されています)。
編集:
関数が呼び出されます。機能の一部は実際に機能しています。