HTML selected="selected" not working

HtmlSelect

Html Problem Overview


Hi can somebody tell me what is the wrong in the below code?

Selected="selected" not working for me.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <select id="tstselect" name="tstselect" onchange="showselected(this.value);">
    <option value="0" >0</option>
    <option value="1" >1</option>
    <option value="2" >2</option>
    <option value="3" selected="selected">3</option>
    </select>

Thanks in advance

Html Solutions


Solution 1 - Html

You probably have something on your page selecting the value. You might be able to quickly verify that if the same value is still selected after changing the order of the options in the html...

You might want to refer to: https://stackoverflow.com/questions/4831848/firefox-ignores-option-selected-selected

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionjestgesView Question on Stackoverflow
Solution 1 - HtmlDavidView Answer on Stackoverflow