jQuery and its cousins are great, and by all means use them if it makes it easier to develop your application. startswith ('has_') and value: count. Take a look at the following script: