If there are several TextBoxs in the page, they can set his readOnly attribute directly. But if there are many? Then use it to include all textbox to one. The code is as follows: