<input name=show onclick=f()>
<script language=javascript>
function f(){
var m="sfsdf";
alert(m);
}
</script>

解决方案 »

  1.   

    事情是原来的onclick事件函数已有定义,并且还带有参数
      

  2.   

    <input id=hello type=button onclick="func1(),func2()">
    调用多个函数用逗号隔开~~
      

  3.   

    <input id=hello type=button onclick="func1('adb'),func2()">
      

  4.   

    是希望用script函数将func1(a,b),func2(c,d)赋给该按钮的onclick事件
      

  5.   

    onclick="alert(this);alert(this+'fdsaf')"
      

  6.   

    function func3(){
      func1(a,b);
      func2(c,d);
    }
    document.onclick=func3;
      

  7.   

    笔误,

    document.onclick=func3;
    改为:
    document.all.hello.onclick=func3;