$('#ProductSearch').keydown(function (event) {
                switch (event.keyCode) {
                    case 13:
                        if ($(this).val() != '') {
                            window.location.href = "/Sell/Index?ProductSearch=" + $(this).val();
                        }
                        break;
                }
            });

KeyCode

KeyCodeValue
13Return or Enter key on keyboard
Last modified: November 10, 2020

Author

Comments

Write a Reply or Comment