回调函数实例
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script><script>var myObj = function(){ this.id = '00001'; this.name = 'zhangsan';}myObj.prototype.onSureCallback = function () {};function myFun(param){ alert("this is my function. \n myObj.id = " + param.id + " \n myObj.name = " + param.name);}jQuery(document).ready(function() {try { var funName = "myFun"; var obj = new myObj(); obj.onSureCallback = function(param){ window[funName](param);};obj.onSureCallback(obj);} catch (e) {alert("e:"+e.message);}});</script>
?