I have an input box…
<input type="text" id="search_member" onkeyup="lookup(this.value);">
When I type in the field, it will go to function lookup(). From there I want to get the id of this input. I tried…
var This_id = $(this).attr("id");
but this won’t work. Any suggestions on how I can get the id?
Because you are passing
this.valueto yourlookup()function. It’s better to passthisto your function and then usearg.valueto get the value andarg.getAttribute('id')for theid