문제

body tag: <a href="javascript:gotoURL();">T&Cs</a>

head tag:

function gotoURL() {

        window.location = 'someurl.html';

    }

Not working, any idea?

도움이 되었습니까?

해결책

Modify the function:

function gotoURL() {
  window.location.href = "someurl.html";
}

Source: How can I make a redirect page in jQuery/JavaScript?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top