写一个function runFunc(func),func的值是另外一个function,runFunc 拿到func后要想办法执行func,但是不能用func()去执行。
#######################
想了一下写了一个大概的,有待考证!
#######################
<script language="javascript"> function runFunc(func){ func.fun=showthis; } function showthis(){ alert("my name is "+this.name); } myfunc ={ name:" Eason "}; runFunc(myfunc); myfunc.fun(); </script>
#####################
同事整理
#####################
<script language="javascript"> function runFunc1(func){ func=function(myid){alert("my qq number is:"+this.myid+ "; my name is: "+this.myname.name);} return func(); } myid="365680861"; myname={name:"Eason"}; runFunc1(function(myid,myname){}); </script>