fixed hasClassName, updated test page

fix bug in hasClassName