Hola
micayael
A ver si te sirve algo así:
Código PHP:
<html>
<head>
<script type="text/javascript">
function ini() {
document.getElementById('pepe').onclick = function() {
alert('Hola') }
}
</script>
</head>
<body onload="ini()">
<input type="button" id="pepe" />
</body>
</html>
Saludos,