setAttribute
Given an element:
<input id="elem">
Set its value attribute to 'text'.
value
'text'
Set its class attribute to 'valid'.
class
'valid'