Skip to content

Instantly share code, notes, and snippets.

@D-Andreevich
Created September 30, 2017 02:04
Show Gist options
  • Select an option

  • Save D-Andreevich/f494a5f9ea1f4adad814a19007942c35 to your computer and use it in GitHub Desktop.

Select an option

Save D-Andreevich/f494a5f9ea1f4adad814a19007942c35 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test Map</title>
</head>
<body>
<script type="text/javascript">
function prov(){
var array_word = [];
for(var id = 1; id < 3 ; id++){
document.getElementById('o'+id).innerText = document.getElementById('v'+id).value;
array_word[id] = document.getElementById('w'+id).innerText;
}
console.log(array_word);
}
</script>
<span id='w1'>сл<span id='o1'><select id="v1" >
<option value="_" selected>_</option>
<option value="o" >о</option>
<option value="a" >а</option>
<option value="e" >е</option>
</select></span>во</span>
<br/>
<span id='w2'>те<span id='o2' ><select id="v2" >
<option value="_" selected>_</option>
<option value="к" >к</option>
<option value="о" >о</option>
<option value="e" >е</option>
</select></span>ст</span>
<br/>
<input type="button" value="Проверить" onclick="prov()"></input>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment