Tuesday, November 17, 2015

TextBox set to ReadOnly using javascript

Here is a quick solution that works across the all browsers. Add below code in input textbox.

onKeyPress = "javascript: return false;" onPaste = "javascript: return false;" .

That way, even the textbox is enabled, the user will not be able to modify the data