fix wrong idbytes js check ,use jquery to trim string
unify js object access style