<input type=text onKeyUp="dot(this)">
<script>
function dot(v) {
  v.value = n.replace(/(\d*\.\d{2})(.*)/,"$1");
}