function doit()
{
document.getElementById('aa').onclick=function(){doit2('aaaaaa');}
}
function doit2(value)
{
alert(value);
}
<html>
<body onload='doit()'>
<input type='button' value='按钮' id='aa' onclick=''>
</body>
</html>
这样 就可以传递给doit2参数了!!
也可以在自定义函数里对参数进行加工!!
就看需要了