結果 : how to pass current element in javascript function