时间:2021-07-01 10:21:17 帮助过:5人阅读
<script type="text/javascript">
function fn(name){
if(typeof name === "string"){
var args = Array.prototype.slice.call( arguments, 1 );
for(var i=0;i<args.length;i++){
alert(args[i]);//结果: 111 222
}
}
}
function callFn(){
fn("test",111,222);
}
callFn();
</script>