誰でも知っていますか、属性を設定した最初のロード時に div 要素がright:0
ありbottom:0
ます ; 取得したいのですstyle.left
が、戻りNaN
ます。それで、それを取得する方法、または別の方法はありますか?
<div id="myDiv">Sample</div>
<script type="text/javascript">
var setMe = document.getElementById("myDiv");
setMe.setAttribute("style", "background-color: red;
position: absolute;
width: 670px;
height: 370px;
right: 0;
bottom: 0;");
alert(setMe.style.left)
</script>