1<!DOCTYPE html>
2<html>
3
4<head>
5 <script>
6 function goToURL() {
7 location.href = 'http://google.it';
8
9 }
10 </script>
11</head>
12
13<body>
14 <a href="javascript:void(0)" onclick="goToURL(); return false;">Go To URL</a>
15</body>
16
17</html>