Thanks but would it be the same for VBScript?

<html>
<head>
<script language=vbscript>
function x()
'do something
end function

</script>
</head>

<body>
<A href="page2.html" onClick="x()">page2</a>

</body>
</html>