With minimum modifications ,
<input type='text' class='blabla' onkeyup="doSomething(e)">
function doSomething(e){
var comment = $(".blabla").val();
var id = this.id;
alert(e.keyCode) // Now it should work
}
The first parameter in the doSomething function will be the event object.
The this
variable will return a reference to the input element.
If you modify your posted js and provide a name to the function as I have done without making changes to the function parameters, you will find that id
will contain the event object.