javascript & call
1, Test call function of Array var slice = Array.prototype.slice; alert("slice.call(NaN).length:"+slice.call(NaN).length); // result : 0 alert("slice.call({0:'foo',length:'10',9:'2'})[0]:"+slice.call({0:'foo',length:'10',9:'2'})[0]); // result : foo alert("slice.call({0:'foo',length:'10',9:'2'})[9]:"+slice.call({0:'foo',length:'10',9:'2'})[9]); // result : 2 alert("slice.call({0:'foo',length:'bar'})[0]:"+slice.call({0:'foo',length:'bar'})[0]); //result : undefined So, function call(arg) , "arg" is Set of name/value pairs, set enclosed by a pair of curly braces {} , "length" is length of array, others are order number of array. 2, Mouse position <script> function mouseMove(ev) { ev= ev || window.event; var mousePos = mouseCoords(ev); //alert(ev.pageX); document.get...