<input type='text' value='' id='text1'><input type='button' value='push' onclick='delet1()'> <script> var tekct = document.getElementById('text1').value function delet1() { if( /[0-9]/.test(tekct) ) { document.getElementById('text1').value = '' } else { alert('false') } } </script>
<input type='text' value='' id='text1'><input type='button' value='push' onclick='delet1()'> <script> function delet1() { var str = document.getElementById('text1').value var text1 = parseInt(str,10) if( /[0-9]/.test(text1) == true ) { document.getElementById('text1').value = '' } else { alert('false') } } </script>
alert( /\[object Object\]/.test({}) );