Hola:
Si necesitas el parámetro, puedes probar poner un paso intermedio para que lea el id...
Fíjate en este ejemplo:
Código:
<html>
<head>
<title>
prueba
</title>
<script type="text/javascript">
valor = 0;
function muestraid() {
alert(this.id);
}
function crearBotton() {
b = document.createElement("button");
b.id = "valor" + valor++;
b.onclick = muestraid;
document.body.appendChild(b);
t = document.createTextNode("pincharme")
b.appendChild(t);
}
</script>
</head>
<body >
<input type="button" onclick="crearBotton()" value="prueba" />
</body>
</html>
Saludos