O seguinte define a meta para _blank:
if (key == "smk") {
window.location = "http://www.smkproduction.eu5.org";
target = "_blank";
done = 1;
}
Mas isso não parece funcionar. Como eu inicio o link em uma nova guia?
Aqui está o meu código:
function ToKey() {
var done = 0;
var key = document.tokey.key.value;
key = key.toLowerCase();
if (key == "smk") {
window.location = "http://www.smkproduction.eu5.org";
target = "_blank"
done = 1;
}
if (done == 0) {
alert("Kodi nuk është valid!");
}
}
<form name="tokey">
<table>
<tr>
<td>Type the key</td>
<td>
<input type="text" name="key">
</td>
<td>
</td>
<td>
<input type="button" value="Go" onClick="ToKey()">
</td>
</table>
</form>
Então você quer abrir um url em uma nova janela?
—
Musa
Sim ?! apenas se a chave estiver certa ...
—
Flamur Beqiraj
onde o
—
Lucas
HEADfecha?