신현석님의 '접근성을 해치지 않는 자바스크립트의 사용'이라는 글 중에서...
의미 없는 href 값을 사용한 경우
1 2 3 | < a href = "#notice-list" onclick = "showNoticeTab(); return false;" > < img src = "notice-tab.gif" alt = "Notice" > </ a > |
1 2 3 | < button onclick = "myAction()" > < img src = "button.gif" alt = "보기" > </ button > |
팝업창을 열 때(window.open)
1 2 3 | < a href = "popup.html" onclick = "window.open(this.href, 'popupName', 'width=300,height=200'); return false;" > < img src = "openWindow.gif" > </ a > |
실제로 위의 경우 나쁜 예로 많이 사용했었는데 신경써야겠다.
'Web Standard > JavaScript' 카테고리의 다른 글
정규식 표현으로 필드값 검사하기 (0) | 2011.10.11 |
---|---|
XMLHttpRequest Object (0) | 2011.05.15 |
Basic Filter for Index (1) | 2011.04.18 |
Recent Comments