set attribute Set the value of the targeted data attribute. #javascript#select#attribute element.setAttribute('attribute','value'); copy