阅读背景:

使用getElementByID多次使用对象文字的有效方法?

来源:互联网 

I'm a beginner at javascript and just getting started with working with the DOM. After grabbing a bunch of spans with different ID names at several different places and grabbing the data from an object literal, it seemed to start getting redundant. Isn't there a better way of writing this? I'm also learning functions but not really sure how to relate it together. Here's the JSfiddle for easier viewing. I'm a beginner at javascript and just getting s




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: