The input readonly attribute ReadOnly and Enabled property of the TextBox difference

The input readonly attribute: JS can modify the input value, and then submitted to the server, the value obtained after the modification.

TextBox ReadOnly property: js Text modified by the value submitted to the server, the server provider can not obtain the modified value Text, Text value that is submitted back to the server can not be modified by js, but can be modified to obtain js by Reqest.Form [id] value . Text will not change after the value is always back to the server.

TextBox Enabled property: Similarly to ReadOnly, first style will be gray, and Reqest.Form [id] will be empty.

 Readonly attribute by adding the input to achieve the same effect as the TextBox readonly Attribute in the background.

Reprinted from: http://www.cnblogs.com/longjxchina/archive/2010/11/29/1891418.html

Reproduced in: https: //www.cnblogs.com/zhangchenliang/archive/2011/06/07/2074470.html

Guess you like

Origin blog.csdn.net/weixin_34402408/article/details/93496118