Created
December 11, 2020 16:44
-
-
Save matthewmorrone/38d2ffff22fcc73569d6d9fac18ae03b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<p>If the language you speak is not on the list, you can include it in the URL</p> | |
<select><script> | |
var option = decodeURIComponent(document.location.hash.substring(1)); | |
document.write("<OPTION value=1>English</OPTION>"); | |
document.write("<OPTION value=2>French</OPTION>"); | |
document.write("<OPTION value=3>"+option+"</OPTION>"); | |
function htmlEncode(userInput) { | |
var div = document.createElement('div'); | |
var text = document.createTextNode(userInput); | |
div.appendChild(text); | |
return div.innerHTML; | |
}; | |
</script></select> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment