The code below is for a dropdown in html:
<html>
<body>
<select id="demo1" name="demo2" type="text">
<option value="london">London</option>
<option value="paris">Paris</option>
<option value="tokyo">Tokyo</option>
</select>
</body>
</html>
How to make the option with value "paris" selected? Please consider it is not possible to change anything in the code above.
The code was edited to give more details because unfortunately the answers did not work on this question.
The below code did not work as well:
<script>
var selectedtext = "paris";
document.getElementById("demo1").selected = selectedtext;
</script>