function handleKeyPress(e){
if(e.key==='Enter'){
goLogin()
}
}
<div>
<table className='login-table'>
<thead></thead>
<tbody>
<tr>
<td><input type='text' name='memId' placeholder='아이디를 입력하세요' className='login-input'
onChange={(e)=>{inputLogin(e)}}></input></td>
</tr>
<tr>
<td><input type='password' name='memPw' placeholder='비밀번호를 입력하세요' className='login-input'
onKeyDown={(e)=>{handleKeyPress(e)}}
onChange={(e)=>{inputLogin(e)}}></input></td>
</tr>
</tbody>
</table>
<button type='button' className='login-Btn'
onClick={(e)=>{goLogin();}}>로그인</button>
</div>
onKeyPress는 사용이 안되어서
onKeyUp이나 onKeyDown쓰면 될 것 같다.