user_i,
или так...
<!DOCTYPE html>
<html >
<head>
<title></title>
</head>
<body>
<input type="button" name="go" value="go" id="button" />
<script type="text/javascript">
function doSomething(a) {
alert(a)
}
document.getElementById('button').onclick = function ()
{
doSomething('Спасибо')
}
</script>
</body>
</html>