0

I have this code in JS:

function Loremos() {
    var username = document['Wybor']['lang'].value;
    if (username.length != 0) {
        window.location = "http://twitter." + language;
    }
}

In HTML

<a href="javascript:Loremos();" target="_blank">twitter</a>

I want to open this in new tab and it doesn't work. What I done wrong?

sfletche
  • 47,248
  • 30
  • 103
  • 119
mrfox
  • 49
  • 9

0 Answers0