Covalent attachment of poly(ionic liquid)s (PILs) by click chemistry on glass or silicon (Si) surfaces was performed…