展开全部
程序代码如下:
function test(){
alert(arguments)
arguments = Array.prototype.slice.call(arguments);
alert(arguments instanceof Array);
alert(arguments)
}
test(1,2,3,4);
//※※62616964757a686964616fe58685e5aeb931333365646261※※※※※※※※※测试2※※※※※※※※※※※※※※
var htmlcollection = document.getElementsByTagName("h3");
alert(htmlcollection)
try{
htmlcollection = Array.prototype.slice.call(htmlcollection);
alert(htmlcollection instanceof Array);
alert(htmlcollection);
}catch(e){
alert(e)
}
//※※※※※※※※※※※测试3※※※※※※※※※※※※※※
var sheets = document.styleSheets;
alert(sheets)
try{
sheets = Array.prototype.slice.call(sheets);
alert(sheets instanceof Array);
alert(sheets);
}catch(e){
alert(e)
}
alert(arrayLike)
arrayLike = Array.prototype.slice.call(arrayLike);
alert(arrayLike instanceof Array);
alert(arrayLike);