データベースで幅、高さ、上、左のプロパティを使用して、特定の div に設定しています。
$information =<<<HEREENDS
<div id = "randomDiv" style = "
left: {$array[0][3]}px;
top: {$array[0][4]}px;
width : {$array[0][5]}px;
height : {$array[0][6]}px; " >
</div>
HEREENDS;
echo $information;
それは機能しますが、よりスマートなソリューションを探しています-配列をjavascriptに送信し、これらのスタイルをインラインではなくjavascriptで設定する方法はありますか?
前もって感謝します。