結果 : check if input is selected javascript