Could you compare the properties
I want to disable the text field "txtName". There are two ways:
txtName.disabled = true
<.. Enabled="false" ..>
Which method is better and why?
I assume that Enabled="false"results disabled="disabled"in the generated HTML code. In this case, this is by far the best way, since it does not require the user to enable JavaScript.
Enabled="false"
disabled="disabled"
If you want to disable the button, the server-side method will require feedback (page feed back, triggering event handlers, response).
The client-side method (javascript) does not require this.
, javascript , .
( disabled).
disabled
.
Source: https://habr.com/ru/post/1778294/More articles:Using PHP & curl to publish html form containing file - postX11 / Xlib: the window is always on top - user-interfaceНесовместимы ли отказоустойчивые и отказоустойчивые принципы обработки исключений? - language-agnosticphp cURL, fill out the remote form - phpoptimal classification algorithm - algorithmendianess-check with increased difference compared to the result for a small code - c ++C # XML - Reading an XML document in a bundle - c #How to use cURL form values for POST in a form using JS - javascriptfix NSWindow size? - objective-cConnecting to Facebook API with PHP - phpAll Articles