Tentei fazer de duas maneiras pra gerar um link e efetuar o download quando clicado no botão… mas apenas consigo gerar e visualizar o link… alguem pode me ajudar
Agradeço a todos… pela Atenção Obrigado
######################################################################
<html>
<head>
<title></title>
</head>
<body>
<h3>Digite o Link de Download</h3>
<label>Download
<input type="text" id="name" /></label> http://www.guj.com.br/index.php?action=down=
<label>Nº
<input type="text" id="contador" name="count" size="5" />
<input name="Botão" type="button" class="show"onClick="conta();" value=" Download " />
</label>
<h2>
</h2>
<script type="text/javascript" defer>
var vCont = 0;
var nome = document.getElementById("name");
var count = document.getElementsByName("count")[0];
var btn = document.getElementsByClassName("show")[0];
var label = document.getElementsByTagName("h2")[0];
btn.onclick = function() {
label.innerHTML = nome.value +""+ count.value +"";
vCont = vCont + 1;
var cnt = document.getElementById('contador').value = vCont;
}
</script>
</body>
</html>
######################################################################
<html>
<head>
</head>
<body>
<a href="http://www.guj.com.br/" id="teste1" /> http://www.guj.com.br/index.php?action=down=
<input type="text" id="contador" name="isso" size="5" />
<input type="button" value="Download" onClick="conta();" />
<script type="text/javascript">
window.onload = function(){
document.getElementById('link').click();
}
<!--
var vCont = 0;
function conta(){
vCont = vCont + 1;
document.getElementById('contador').value = vCont;
}
//-->
</script>
</body>
</html>
######################################################################