function $(id){return typeof id==='string'?document.getElementsById(id):id;}為什么還需要判斷id是不是等于string字符串 ?而不是直接返回document.getElementsById(id) ?什么情況下它才不是字符串?
請(qǐng)各位高手指教
Sunshine518
2014-09-20 20:24:49