我有一個國家的名單與他們的呼號,我希望通過選擇一個國家在列表中的國家的指示對應於我的輸入,但它不工作...我做找不到解決插入一個值到輸入
<script type="text/javascript">
var mytextbox = document.getElementById('Recipient');
var mydropdown = document.getElementById('indicatif');
mydropdown.onchange = function(){
mytextbox.innerHTML = this.value;
}
</script>
<select style="visibility:hidden;" style="color:black;" id="indicatif">
<option value="">Destination country</option>
<option value="+355">Albania</option>
<option value="+213">Algeria</option>
<option value="+376">Andorra</option>
<option value="+244">Angola</option>
<option value="+1264">Anguilla</option>
<option value="+1268">Antigua and Barbuda</option>
<option value="+54">Argentina</option>
<option value="+374">Armenia</option>
<option value="+297">Aruba</option>
<option value="+61">Australia</option>
<option value="+43">Austria</option>
<option value="+994">Azerbaijan</option>
<option value="+1242">Bahamas</option>
....
</select>
<input style="color:black;" name="Recipient" id="Recipient" type="text">
''元素有'.value'不'.innerHTML' –