<style type="text/css">
div {
background: blue;
position: absolute;
color: white;
text-align: center;
width: 100px;
height: 100px;
}
</style>
<script type="text/javascript">
window.onload = function(){
var i = 0;
(function(){
if(++i <= 300){
var element = document.getElementById('qwe');
element.style.width = i+'px';
element.innerHTML = parseInt(i/3)+'%';
setTimeout(arguments.callee, 10);
}
})();
};
</script>
<div id="qwe"></div>