How to prevent user from typing in text field without disabling the field?

前端 未结 11 1670
不思量自难忘°
不思量自难忘° 2021-01-31 06:58

I tried:

$(\'input\').keyup(function() {

   $(this).attr(\'val\', \'\');

});

but it removes the entered text slightly after a letter is enter

11条回答
提交回复
热议问题