If you're using pure JS you can simply do it like: var input = document.getElementById('myInput'); if(input.value.length == 0) input.value ...
確定! 回上一頁