以下のコードで私が持っていることを達成するためのより良い/よりクリーンな方法があるかどうか知りたいです。
var updateJob = function(){
document.getElementById("jobDescription").style.display = "block";
document.getElementById("updateButton").style.display = "block";
document.getElementById("equipmentList").style.display = "block";
document.getElementById("jobDesc").style.display = "block";
document.getElementById("equipRan").style.display = "block";
}
可能であればすべての要素を再表示する1行だけにしたいと思いますが、うまくいきdocument.getElementById("jobDescription" + "updateButton" + etc...).style.display = "block";
ません。私はJavaScriptが初めてです。