Created
March 17, 2016 21:36
-
-
Save peregrinogris/57b01df0e9d0ef02c0aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
<head> | |
<link rel="stylesheet" href="http://localhost:3000/build.css"> | |
<!-- <script src="https://d2y1h8z11rh263.cloudfront.net/js/zepto.custom.js"></script> --> | |
</head> | |
<body> | |
<select id="timezone" name="timezone" class="select-control"><option value="America/Sao_Paulo">Brasilia</option></select> | |
<input type=reset> | |
<script type="text/javascript"> | |
var select = document.createElement('select'); | |
select.className = 'select-control'; | |
var option = document.createElement('option'); | |
option.value = 'sarasa'; | |
option.text = 'SARASA'; | |
select.appendChild(option); | |
var option = document.createElement('option'); | |
option.value = 'sarasa2'; | |
option.text = 'SARASA2'; | |
select.appendChild(option); | |
var option = document.createElement('option'); | |
option.value = 'sarasa3'; | |
option.text = 'SARASA3'; | |
select.appendChild(option); | |
var option = document.createElement('option'); | |
option.value = 'sarasa4'; | |
option.text = 'SARASA4'; | |
select.appendChild(option); | |
// select.value= ''; | |
document.querySelector('body').appendChild(select); | |
console.log(select.value); | |
// var select = $('select'); | |
// select.className = 'select-control'; | |
// var option = $('option'); | |
// option.value = 'sarasa'; | |
// option.text = 'SARASA'; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment