Created
October 18, 2010 22:04
-
-
Save carlosdelfino/633171 to your computer and use it in GitHub Desktop.
Demonstra como deve ser um script que abre novas janelas com base num dominio selecionado!
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> | |
<head> | |
</head> | |
<body> | |
<form onsubmit="return false;"> | |
<input id="textfield" value="www" onchange=" | |
var basedomain = document.getElementById('basedomain').value; | |
var value = this.value; | |
var finalurl = 'http://'+value+'.'+basedomain; | |
alert('Tentado acessar: '+finalurl); | |
window.open(finalurl,'',''); | |
" /> | |
<select id="basedomain"> | |
<option value="full.srv.br">full.srv.br</option> | |
<option value="guiabhnorte.com.br">guiabhnorte.com.br</option> | |
<option value="google.com">google.com</option> | |
<option value="gmail.com">gmail.com</option> | |
</select> | |
</form> | |
<script type="JavaScript"> | |
<!-- | |
var textfield = document.getElementById("prefix"); | |
textfield.onLostFocus = textfield.onChange; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment