select_checked

returns input elements that have the attribute checked and the value checked or not.

Source


def select_checked(self):
    ret = pyNodeList()
    for node in self:
        try:
            t = node._attr['checked']
            ret.append(node)
        except KeyError:
            continue
    if len(ret) == 1: return ret[0]
    else: return ret