if 문을 사용할 때 javascript (하드 드라이브에서 실행)를 종료하는 방법을 알려주십시오. 다음 코드가 작동하지 않습니다.다른 경우를 사용하여 스크립트를 종료하는 방법
if (fso.FileExists("C:\\EXT\\file.txt")) //check if there file in the folder
{
log.WriteLine(file_exist_time + " - file exists C:\\EXT\\ ");
}
else
{
log.WriteLine("There is no file in C:\\EXT\\");
function exit()
{
throw ('Script Exit');
}
}
대단히 고마워요! 즉
if (fso.FileExists("C:\\EXT\\file.txt")) //check if there file in the folder
{
log.WriteLine(file_exist_time + " - file exists C:\\EXT\\ ");
}
else
{
log.WriteLine("There is no file in C:\\EXT\\");
return;
// Or possibly throw("Exit");
}
, 그 함수를 호출하지 않습니다 특히, 별도의 함수에서 throw
또는 return
을 넣어하지 않습니다에 대해 어떻게
왜 로그 호출 직후에'throw'하지 않습니까? 방금 당신은'exit'라는 함수를 정의하지만, 결코 호출하지 않습니다. –
"돌아 가기"가 작동합니까? – Tobi
throw ('종료')가 작동하지 않습니다. = ( – May12