if (test.picture.value.substr(test.picture.value.lastIndexOf("."+1,3).toLowerCase()!="gif" || test.picture.value.substr(test.picture.value.lastIndexOf("."+1,3).toLowerCase()!="jpg"
或是用這個run
if ((test.picture.value.substr(test.picture.value.lastIndexOf("."+1,3).toLowerCase()!="gif" || test.picture.value.substr(test.picture.value.lastIndexOf("."+1,3).toLowerCase()!="jpg")