Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- var combinacao;
- function montaCombinacao(){
- var selectA = $("#selectA").val();
- var selectB = $("#selectB").val();
- console.log(SelectA);
- console.log(SelectB);
- if(selectA === "Digital" && selectB === "1"){
- combinacao = "combinacao1";
- }
- else if(selectA === "Digital" && selectB === "2"){
- combinacao = "combinacao2";
- }
- else if(selectA === "Digital" && selectB === "3"){
- combinacao = "combinacao3"
- }
- }
- function montaBotao(){
- var location;
- if (combinacao === "combinacao1"){
- location = "http://google.com.br";
- }
- else if (combinacao === "combinacao2"){
- location = "http://facebook.com";
- }
- else if (combinacao === "combinacao3"){
- location = "http://youtube.com.br";
- }
- $("#download").onclick(window.location.href= location);
- }
- });
Add Comment
Please, Sign In to add comment