digital signature functionnality is not yet implemented in web browsers APIs. A standard API is under work: WebCrypto. See http://www.w3.org/TR/WebCryptoAPI for an overview and more specifically http://www.w3.org/TR/WebCryptoAPI/#document-signing.
By the way, the keys are never read from the smartcard. The operation on the private key must always be made by the smartcard itself to ensure the key privacy.