------解决方案-------------------- var s = f1.toString(); var a = s.split(")"); a = a[0].split(","); alert(a[1]);
------解决方案-------------------- function aaa(a1,a2) { alert(arguments[0]); } var fn=aaa.toString(); var args=fn.substring(fn.indexOf('(')+1,fn.indexOf(')')).split(','); for(var i in args) { document.write(args[i] +"<br>"); }