2012-04-16 53 views

回答

1

如果你想檢查輸入是否只包含空格,trim輸入並檢查結果的長度,我會說。像:

if (txtSSAETitle.value.replace(/^\s+|\s+$/,'').length<1) { /* etc */ }