Created
November 23, 2010 16:02
-
-
Save carlosdelfino/711990 to your computer and use it in GitHub Desktop.
Exemplo de codigo para abrir nova URL conforme um id inserido.
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="0001" onchange=" | |
var value = this.value; | |
if(value){ | |
confirm('Abrindo URL para Cliente: '+value); | |
var finalurl = 'https://minhaurl.com.br/cadastro.php?cda='+value; | |
window.open(finalurl,'',''); | |
} | |
" /> | |
</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