<input type="text" id="phone" name="phone" value="">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> <input type="text" id="phone"> <script> $('#phone').blur(function() { var text = $(this).val(); if (text[0] != '0') { alert("Начни вводить с 0") } }) </script>
<input type="text" id="phone" name="phone" value=""> <script> var input = document.getElementById("phone") ; input.oninput = function() { if(this.value[0]==0) return ; this.value = "" ; alert("Начните вводить с нуля") ; } ; </script>
<input oninput="value[0] == '0' || alert('начни вводить с 0')" />
<script type="text/javascript" src="https://raw.github.com/devote/letJS/master/let.js"></script> <input type="text" data-let-template="/^(0\d*\.?\d*|)$/" />
<script type="text/javascript" src="https://raw.github.com/devote/letJS/master/let.js"></script> <input type="text" data-let-template="/^(0[\S\s]*|)$/" />