I'm trying to grab the txt I wrote inside the my <input type="text"> but it is returning undefined , I tried many ways such as .text() or .html() or e.target.value , all of them returned undefined including this innerHTML too
$('input[type=text]').keyup(function(e){
if(e.which == 13){
alert($('input[type=text]').innerHTML);
}
});