Hi, Experts, How to change the option caption using javascript? Base on my code, I want to change the option caption from "Yes" to "No". Thanks!
<!DOCTYPE html>
<html>
<body>
<button onclick="return ChangeCaption()">Change</button>
<select name="level" id="iAD8" style="color: black; width:50px;">
<option value="yes" selected>Yes</option>
<option value="no">No</option>
</select>
<script>
function ChangeCaption()
{
document.getElementById("iAD8").value = "No";
}
</script>
</body>
</html>
Open in new window