<html>
<body>
<script>
function a(){
alert('called by b');
var s = "";
for(var i = 0; i < arguments.length; i ++) {
s += arguments[i] + ",";
}
alert('s in a=>'+s);
}
function b() {
var s = "";
for(var i = 0; i < arguments.length; i ++) {
s += "'" + arguments[i] + "',";
}
alert(s);
var ds = new String(s);
if( arguments.length>0){
ds = ds.substr(0,ds.lastIndexOf(","));
}
alert("forward function");
// eval("a("+ds+")"); //我想把传入b的动态参数自动传到a函数调用
a.apply( this, arguments );
}
var xxd = 'xxxxxxx';
b('aaa','bbb',xxd);
</script>
</body>
</html>