摘要:
第五章中设置/获取元素属性的函数:function attr(elem, name, value) { // Make sure that a valid name was provided if ( !name || name.constructor != String ) return ''; // Figure out if the name is one of the weird naming cases name = { 'for': 'htmlFor', 'class': 'className' }[n 阅读全文