HTML ReadOnly vs Disabled

This would be a good trivia question for web geeks...what's the difference between setting readonly=true and disabled=true on an input element?

 

Answer:

disabled doesn't get submitted in form post

 

disabled controls won't receive focus (and are excluded from tabbed navigation)


both should prevent the keyboard from appearing when the user tries to enter data into the input on a touch screen

 

not all elements use readonly, such as SELECT, BUTTON, and OPTION

 

setting readonly to true will not change the visual appearance of the control, which may sometimes be confusing. Disabled will often make the input color change.

Add a Comment...

 

Comments

ewrqwrqw - 9/29/2016

Hey would you mind stating which blog platform you're using? I'm going to begin my very own blog soon but I'm using a tough time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The main reason I ask is simply because your design seems different then most blogs and I'm trying to find something unique. P.S Apologies for getting off-topic having said that i needed to ask! - 9/24/2016

Many thanks for finally writing about >HTML ReadOnly vs Disabled - 9/15/2016

After I originally commented I appear to have clicked on the -Notify me when new comments are added- checkbox and from now on whenever a comment is added I get four emails with the exact same comment. Perhaps there is certainly a way you can remove me from that service? Thank you! - 9/07/2016

Wonderful beat ! I would want to apprentice whilst you amend your site, how can i subscribe for a blog site? The account aided me a acceptable deal. I was a little bit acquainted of this your broadcast offered bright clear concept - 9/03/2016

I had been recommended this web site by my cousin. I'm unclear whether this post is published by him as no one else know such detailed about my problem. You're amazing! Thanks! - 9/01/2016

I visited multiple web pzges however the auidio quality for audio sonngs existing att this web page is truly wonderful. - 7/15/2017

Тинедол â ÑÑÑекÑивное ÑÑедÑÑво Ð¾Ñ Ð³Ñибка ÑÑопÑ, непÑиÑÑного запаÑа и зÑда нейÑÑализÑÐµÑ Ð½ÐµÐ¿ÑиÑÑнÑе запаÑи боÑеÑÑÑ Ñ Ð³Ñибком ÑÑÐ¾Ð¿Ñ ÑÑÑÑанÑÐµÑ Ð·Ñд Ð¼ÐµÐ¶Ð´Ñ Ð¿Ð°Ð»ÑÑев пÑедоÑвÑаÑÐ°ÐµÑ Ð¼Ð¸ÐºÐ¾Ð· ногÑей ÑбиÑÐ°ÐµÑ ÑелÑÑение Ðлимбазол ÑÑÑекÑивно боÑеÑÑÑ Ñ Ð³Ñибком ÐеÑейÑи на ÑайÑ: - 7/07/2017

We are the number suppliers of Desoxyn. We supply excellent quality Desoxyn at very competitive prices. We carry Desoxyn in 5, 10 and 15 mg respectively. Besides Desoxyn we do supply other ADD/ADHD medications . A prescription is not needed to place an order at our website. We do delivery to any address in discreet shipment Tracking numbers are provided for every package. Ordering is legit and very confidential To place your order, visit our website at www.buyrealmeds.com Call or text 46 - 5/07/2017

We are the number suppliers of Desoxyn. We supply excellent quality Desoxyn at very competitive prices. We carry Desoxyn in 5, 10 and 15 mg respectively. Besides Desoxyn we do supply other ADD/ADHD medications . A prescription is not needed to place an order at our website. We do delivery to any address in discreet shipment Tracking numbers are provided for every package. Ordering is legit and very confidential To place your order, visit our website at www.buyrealmeds.com Call or text 46 - 5/07/2017

prostate exam female doctor cialis reseptfritt i norge buy desoxyn online no prescription - 5/01/2017

blackberry tablet best buy cialis sin receta madrid moses cone outpatient pharmacy - 4/28/2017

tablet with phone service tadalista 20 india sony xperia tablet z - 4/22/2017

I love looking at your web sites. Kudos! - 4/08/2017

Hi Admin, I have just gone through to your blog; it seems a brilliant use of content and images to express your information. Itâs really impressive blog about the stuff like that. - 4/05/2017

breastfeeding birth control pill buy fastin xr say no to drugs and alcohol - 3/27/2017

Shamrock - wearing green shamrocks is practically like a uniform on St. Patrick's Day. - 2/23/2017

Definitely believe that which you stated. Your favorite justification seemed to be on the internet the simplest thing to be aware of. I say to you, I certainly get annoyed while people consider worries that they just do not know about. You managed to hit the nail upon the top and also defined out the whole thing without having side-effects , people could take a signal. Will likely be back to get more. Thanks - 2/16/2017

Wow, that's things i was exploring for, what a data! existing here at this website, thanks admin of the site. - 11/19/2016

I actually have to thank you for the efforts you've put in penning this website. I'm hoping to look at the same high-grade blog articles on your part at a later time too. In reality, your creative writing abilities has inspired me to get my very own website now ;) - 11/15/2016

If some one desires to be updated with newest technologies after that he needs to be visit this site and also be up to date each day. - 10/11/2016

Hello there! I know this is somewhat off topic nevertheless i was wondering which blog platform are you using for this website? I'm getting tired of Wordpress because I've had problems with hackers and I'm considering alternatives for the next platform. I would be fantastic should you could point me in the direction of a good platform. - 10/07/2016

Hey just wanted to give you a brief heads up and let you know a few of the images aren't loading correctly. I'm not sure why but I think its a linking issue. I've tried it in two different browsers and both show the same results. - 10/06/2016

It's going to be finish of mine day, however before ending I am just reading this fantastic post to increase my knowledge. - 10/03/2016