<input type="text" style="width: 100%; height: 28px;" name="txtInput" id="txtInput"/>
// in javascript
$("#txtInput").keypress(function (event) {
if (event.keyCode == 13) {
var id= $("#txtInput").val();
if (id != '') {
//do work
}
else {
//do work
}
}
});
0 Comments