jquery px to integer
270 ワード
<div id="demo1" style="height:20px;">
</div>
<script type="text/javascript" >
var px_height=$("#demo1").css('height');//20px
var height=parseInt(px_height, 10);//20
</script>
<div id="demo1" style="height:20px;">
</div>
<script type="text/javascript" >
var px_height=$("#demo1").css('height');//20px
var height=parseInt(px_height, 10);//20
</script>