JS 收集

判讀是否爲空

 

if (isNaN(document.frm.username.value)|| document.frm.username.value.replace(/^\s*|\s*$/g, '') == "") {
	window.alert("不能爲空或不爲數字!");
	document.frm.username.focus();
	return false;
}
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章