function s1Func(){ var s1Text = document.getElementById("s1Text"); var getType = s1Text.getAttribute("type"); alert(getType); }