Ya vi como es, el evento click es con parentesis xD .click()
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script>
document.write("<input type='button' value='Ok' onClick='cambia()' />");
function cambia(){
alert("IN");
}
function test(){
alert("onload In");
var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
alert(inputs[i].type);
if (inputs[i].type === 'button') {
inputs[i].click();
//inputs[i].disabled = true;
}
}
}
</script>
</head>
<body onload="test()">
</body>
</html>