結果 : how to call function on input in javascript