$(document).ready(function() {_x000D_
$('#openFile').on('change', function(evt) {_x000D_
console.log(this.files[0].size);_x000D_
});_x000D_
});
_x000D_
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>_x000D_
<form action="upload.php" enctype="multipart/form-data" method="POST" id="uploadform">_x000D_
<input id="openFile" name="img" type="file" />_x000D_
</form>
_x000D_