if (form.m_mtel.value.length!=0) { if (!form.m_mtel.value.match(/^09[0-9]{8}$/) ) { alert( "手機必須09開頭的10碼數字。") form.m_mtel.focus(); return false; } }