var a = document.getElementsByClassName('cvv'); a[0].contentWindow.document.getElementsByName('cardCvc');