js正則表達式驗證大全(轉) /判斷輸入內容是否爲空 function IsNull(){ var str = document.getElementById('str').value.trim(); i