http://api.prototypejs.org/dom/element/readattribute/
readAttribute 로 읽어오면 된다.
<span class="time txteventdate b" style="font-size:18px;" time="{$oItem.event_end|countdown:"sec"}">
html 에 time 이른 속성값을 임의로 주고 난다음
그냥 oSpan.time 으로 ie에서는 읽혀지나
firefox 나 다른 브라우저에서는 못읽어온다.
prototype 에서는
다음과 같이 쓰면 할수 있다.
var t = arrTime[i].readAttribute('time')-count;
참고
hasAttribtue, writeAttribute
'PROGRAMMING > JavaScript' 카테고리의 다른 글
firefox onkey 이벤트 들 한글은 안되냐? (0) | 2010.05.06 |
---|---|
HTML5 canvas (0) | 2010.04.16 |
[javascript] jQuery (0) | 2010.04.01 |
[JavaScript] 한글 글자수 알아내기. (0) | 2010.03.10 |
prototype 예 class 를 추가하거나 뺄수 있다. (0) | 2010.01.29 |