Tuesday, 19 September 2017

How can I set the default value for an HTML element?



I thought that adding a "value" attribute set on the











However, this did not work as I had expected. How can I set which element is selected by default?


Answer



Set selected="selected" for the option you want to be the default.





No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...